Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sqlx #33

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ any = []
ffi = ["any", "ffi-support", "logger", "option-lock"]
jemalloc = ["jemallocator"]
logger = ["env_logger", "log"]
postgres = ["sqlx", "sqlx-core", "sqlx/postgres", "sqlx/tls"]
sqlite = ["num_cpus", "sqlx", "sqlx-core", "sqlx/sqlite"]
postgres = ["sqlx", "sqlx/postgres", "sqlx/tls"]
sqlite = ["num_cpus", "sqlx", "sqlx/sqlite"]
pg_test = ["postgres"]

[dev-dependencies]
Expand Down Expand Up @@ -72,16 +72,11 @@ path = "./askar-crypto"
features = ["all_keys", "any_key", "argon2", "crypto_box", "std"]

[dependencies.sqlx]
version = "=0.5.5"
version = "0.5.9"
default-features = false
features = ["chrono", "runtime-tokio-rustls"]
optional = true

[dependencies.sqlx-core]
version = "=0.5.5"
default-features = false
optional = true

[profile.release]
lto = true
codegen-units = 1
Expand Down
2 changes: 1 addition & 1 deletion src/backend/postgres/test_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl TestDB {
// acquire a new connection free from the pool. this is to ensure that
// connections are being closed, in case postgres is near the
// configured connection limit.
let mut lock_txn = conn_pool.acquire().await?.release();
let mut lock_txn = conn_pool.acquire().await?.detach();
<Postgres as Database>::TransactionManager::begin(&mut lock_txn).await?;
if sqlx::query_scalar("SELECT pg_try_advisory_xact_lock(99999)")
.fetch_one(&mut lock_txn)
Expand Down