update sqlx to ^0.7
This commit is contained in:
parent
b7adb5fd7d
commit
ad48ec415c
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "torn-key-pool"
|
||||
version = "0.6.1"
|
||||
version = "0.6.2"
|
||||
edition = "2021"
|
||||
authors = ["Pyrit [2111649]"]
|
||||
license = "MIT"
|
||||
|
@ -21,7 +21,7 @@ torn-api = { path = "../torn-api", default-features = false, version = "0.5.10"
|
|||
async-trait = "0.1"
|
||||
thiserror = "1"
|
||||
|
||||
sqlx = { version = "0.6", features = [ "postgres", "chrono", "json" ], optional = true }
|
||||
sqlx = { version = "0.7", features = [ "postgres", "chrono", "json" ], optional = true }
|
||||
serde = { version = "1.0", optional = true }
|
||||
chrono = { version = "0.4", optional = true }
|
||||
indoc = { version = "1", optional = true }
|
||||
|
@ -35,7 +35,7 @@ awc = { version = "3", default-features = false, optional = true }
|
|||
|
||||
[dev-dependencies]
|
||||
torn-api = { path = "../torn-api", features = [ "reqwest" ] }
|
||||
sqlx = { version = "0.6", features = [ "runtime-tokio-rustls" ] }
|
||||
sqlx = { version = "0.7", features = [ "runtime-tokio-rustls" ] }
|
||||
dotenv = "0.15.0"
|
||||
tokio = { version = "1.24.2", features = ["test-util", "rt", "macros"] }
|
||||
tokio-test = "0.4.2"
|
||||
|
|
|
@ -205,7 +205,7 @@ where
|
|||
let mut tx = self.pool.begin().await?;
|
||||
|
||||
sqlx::query("set transaction isolation level repeatable read")
|
||||
.execute(&mut tx)
|
||||
.execute(&mut *tx)
|
||||
.await?;
|
||||
|
||||
let mut qb = QueryBuilder::new(indoc::indoc! {
|
||||
|
@ -258,7 +258,7 @@ where
|
|||
api_keys.domains"
|
||||
});
|
||||
|
||||
let key = qb.build_query_as().fetch_optional(&mut tx).await?;
|
||||
let key = qb.build_query_as().fetch_optional(&mut *tx).await?;
|
||||
|
||||
tx.commit().await?;
|
||||
|
||||
|
@ -307,7 +307,7 @@ where
|
|||
let mut tx = self.pool.begin().await?;
|
||||
|
||||
sqlx::query("set transaction isolation level repeatable read")
|
||||
.execute(&mut tx)
|
||||
.execute(&mut *tx)
|
||||
.await?;
|
||||
|
||||
let mut qb = QueryBuilder::new(indoc::indoc! {
|
||||
|
@ -339,7 +339,7 @@ where
|
|||
qb.push("\norder by uses limit ");
|
||||
qb.push_bind(self.limit);
|
||||
|
||||
let mut keys: Vec<Self::Key> = qb.build_query_as().fetch_all(&mut tx).await?;
|
||||
let mut keys: Vec<Self::Key> = qb.build_query_as().fetch_all(&mut *tx).await?;
|
||||
|
||||
if keys.is_empty() {
|
||||
tx.commit().await?;
|
||||
|
@ -383,7 +383,7 @@ where
|
|||
"#})
|
||||
.bind(keys.iter().map(|k| k.id).collect::<Vec<_>>())
|
||||
.bind(keys.iter().map(|k| k.uses).collect::<Vec<_>>())
|
||||
.execute(&mut tx)
|
||||
.execute(&mut *tx)
|
||||
.await?;
|
||||
|
||||
tx.commit().await?;
|
||||
|
|
Loading…
Reference in a new issue