* feat: Implement `get_transaction_depth` for drivers
* test: Verify `get_transaction_depth()` on postgres
* Refactor: `TransactionManager` delegation without BC
SQLite implementation is currently WIP
* Fix: Avoid breaking changes on `AnyConnectionBackend`
* Refactor: Remove verbose `SqliteConnection` typing
* Feat: Implementation for SQLite
I have included `AtomicUsize` in `WorkerSharedState`. Ideally, it is not desirable to execute `load` and `fetch_add` in two separate steps, but we decided to allow it here since there is only one thread writing. To prevent writing from other threads, the field itself was made private, and a getter method was provided with `pub(crate)`.
* Refactor: Same approach for `cached_statements_size`
ref: a66787d36d62876b55475ef2326d17bade817aed
* Fix: Add missing `is_in_transaction` for backend
* Doc: Remove verbose "synchronously" word
* Fix: Remove useless `mut` qualifier
* feat: add Connection::begin_with
This patch completes the plumbing of an optional statement from these methods to
`TransactionManager::begin` without any validation of the provided statement.
There is a new `Error::InvalidSavePoint` which is triggered by any attempt to
call `Connection::begin_with` when we are already inside of a transaction.
* feat: add Pool::begin_with and Pool::try_begin_with
* feat: add Error::BeginFailed and validate that custom "begin" statements are successful
* chore: add tests of Error::BeginFailed
* chore: add tests of Error::InvalidSavePointStatement
* chore: test begin_with works for all SQLite "BEGIN" statements
* chore: improve comment on Connection::begin_with
* feat: add default impl of `Connection::begin_with`
This makes the new method a non-breaking change.
* refactor: combine if statement + unwrap_or_else into one match
* feat: use in-memory SQLite DB to avoid conflicts across tests run in parallel
* feedback: remove public wrapper for sqlite3_txn_state
Move the wrapper directly into the test that uses it instead.
* fix: cache Status on MySqlConnection
* fix: compilation errors
* fix: format
* fix: postgres test
* refactor: delete `Connection::get_transaction_depth`
* fix: tests
---------
Co-authored-by: mpyw <ryosuke_i_628@yahoo.co.jp>
Co-authored-by: Duncan Fairbanks <duncanfairbanks6@gmail.com>
* chore: create 0.8.3 release
* fix: prevent dead-branch warning from Clippy in query macros
cc #3595
* fix: move `#[allow]` from previous commit to the `if` block
* Add a "sqlite-unbundled" feature that dynamically links to system libsqlite3.so library
* update README abouot the newly-added `sqlite-unbundled` feature
* Update README.md to make it clear with bulleted list
Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
* more cfg feature updates
Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
* update documentation in sqlx-sqlx/src/lib.rs too
and also mention possible build time increasement.
* cargo fmt
* Add "sqlite-unbundled" feature to sqlx-cli
* Add sqlite-unbundled to gituhb actions tests
* cfg(feature = "sqlite") => cfg(any(feature = "sqlite", feature = "sqlite-unbundled"))
* fix
* CI: make sqlite-unbundled tests workaround required-features
by duplicating the relevant test section
* use an internal "_sqlite" feature to do the conditional compilation
---------
Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
* fix(ci): update workflows/examples.yml
* Removed archived `actions-rs` actions
* Upgraded `Swatinem/rust-cache`, `actions/checkout`, `actions/download-artifact`, `actions/upload-artifact`
* chore: deprecate `AnyKind`
* fix: remove dead references to DB features in `sqlx-core`
This reactivates a couple of tests that had stopped working.
* chore(ci): move sqlx-cli checks to their own workflow
* fix(ci): remove remaining `uses: actions-rs/cargo`
* fix warnings
* chore: add titles to sqlx-cli jobs
* fix warnings (2)
* fix error in pool example
* fix warnings (3)
* fix query_builder test
* fix: don't run CLI tests on Windows
* chore: upgrade `rust-toolchain` to 1.80
* fix(postgres): fix missing Tokio specialization in `PgCopyIn`
Caught by the new `unexpected_cfgs` lint.
* fix new warnings