deno_core currently uses `=1.6.2` for indexmap, and Cargo refuses to resolve a version with sqlx's requirement of 1.7.0.
004d07dccd/core/Cargo.toml (L18)
* add explicit shutdown of sqlite statement worker in Connection::close()
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
* test sqlite database close method
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
* await worker shutdown after dropping SqliteConnection
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
* restore explicit drop
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
* Support custom initial options for sqlite
Apply suggestions from code review
Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
Apply suggestions from code review
Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
Use order-preserving map to set pragmas for an initial sqlite statement
Use Cow<'static, str> instead of String
Co-authored-by: Austin Bonander <austin@launchbadge.com>
In particular building with bazel and cargo-raze doesn't imply having
cargo at all, and deferring the lookup allows same-crate builds to
succeed with no change to semantics.
Fixes#1414
Signed-off-by: Robert Collins <robert.collins@cognite.com>
When `clap_derive 3.0.0-beta.4` released, new invocations of `cargo install sqlx-cli` would try to compile that against `clap 3.0.0-beta.2` which caused some breakages.
Until `clap 3.0.0` proper is released, we need to pin both versions to insure against potential breakages from automatic upgrades.
closes#1378
* fix: wait until ready after executing other helper queries while pg quering is executing
Signed-off-by: Atkins Chang <atkinschang@gmail.com>
* fix: use tls parameter for testing target
Signed-off-by: Atkins Chang <atkinschang@gmail.com>
* sqlite: use Arc instead of Copy-able StatementHandle
This guarantees that StatementHandle is never used after calling
`sqlite3_finalize`. Now `sqlite3_finalize` is only called when
StatementHandle is dropped.
(cherry picked from commit 5eebc05dc3)
* sqlite: use Weak poiter to StatementHandle in the worker
Otherwise some tests fail to close connection.
(cherry picked from commit 5461eeeee3)
* Fix segfault due to race condition in sqlite (#1300)
(cherry picked from commit bb62cf767e)
* fix(sqlite): run `sqlite3_reset()` in `StatementWorker`
this avoids possible race conditions without using a mutex
* fix(sqlite): have `StatementWorker` keep a strong ref to `ConnectionHandle`
this should prevent the database handle from being finalized before all statement handles
have been finalized
* fix(sqlite/test): make `concurrent_resets_dont_segfault` runtime-agnostic
Co-authored-by: link2xt <link2xt@testrun.org>
Co-authored-by: Adam Cigánek <adam.ciganek@gmail.com>
* fix(macros): tell the compiler about external files/env vars to watch
closes#663closes#681
* feat(cli): add `migrate` subcommand for generating a build script
suggest embedding migrations on `sqlx migrate add` in a new project