Skip to content

Commit

Permalink
issues-969 Update dependencies
Browse files Browse the repository at this point in the history
issues-969 Fix sqlx_query function
  • Loading branch information
ikrivosheev committed Sep 8, 2022
1 parent bac22d3 commit ecbd7c2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ path = "src/lib.rs"
[dependencies]
async-stream = { version = "^0.3" }
async-trait = { version = "^0.1" }
chrono = { version = "^0.4", optional = true }
chrono = { version = "^0.4.20", default-features = false, features = ["clock"], optional = true }
time = { version = "^0.3", optional = true }
futures = { version = "^0.3" }
futures-util = { version = "^0.3" }
log = { version = "^0.4" }
tracing = { version = "^0.1", features = ["log"] }
rust_decimal = { version = "^1", optional = true }
sea-orm-macros = { version = "^0.9.1", path = "sea-orm-macros", optional = true }
sea-query = { git = "https://github.com/ikrivosheev/sea-query", version = "^0.27", features = ["thread-safe"] }
sea-query-binder = { git = "https://github.com/ikrivosheev/sea-query", version = "^0.1", optional = true }
sea-orm-macros = { version = "^0.10.0", path = "sea-orm-macros", optional = true }
sea-query = { git = "https://github.com/SeaQL/sea-query", branch = "master", version = "^0.27", features = ["thread-safe"] }
sea-query-binder = { git = "https://github.com/SeaQL/sea-query", branch = "master", version = "^0.1", optional = true }
sea-strum = { version = "^0.23", features = ["derive", "sea-orm"] }
serde = { version = "^1.0", features = ["derive"] }
serde_json = { version = "^1.0", optional = true }
Expand Down
10 changes: 5 additions & 5 deletions src/driver/sqlx_mysql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,9 @@ impl From<MySqlQueryResult> for ExecResult {
}

pub(crate) fn sqlx_query(stmt: &Statement) -> sqlx::query::Query<'_, MySql, SqlxValues> {
if let Some(values) = &stmt.values {
sqlx::query_with(&stmt.sql, SqlxValues(values.clone()))
} else {
sqlx::query_with(&stmt.sql, SqlxValues(Values(Vec::new())))
}
let values = stmt
.values
.as_ref()
.map_or(Values(Vec::new()), |values| values.clone());
sqlx::query_with(&stmt.sql, SqlxValues(values))
}
10 changes: 5 additions & 5 deletions src/driver/sqlx_postgres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,9 @@ impl From<PgQueryResult> for ExecResult {
}

pub(crate) fn sqlx_query(stmt: &Statement) -> sqlx::query::Query<'_, Postgres, SqlxValues> {
if let Some(values) = &stmt.values {
sqlx::query_with(&stmt.sql, SqlxValues(values.clone()))
} else {
sqlx::query_with(&stmt.sql, SqlxValues(Values(Vec::new())))
}
let values = stmt
.values
.as_ref()
.map_or(Values(Vec::new()), |values| values.clone());
sqlx::query_with(&stmt.sql, SqlxValues(values))
}
10 changes: 5 additions & 5 deletions src/driver/sqlx_sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ impl From<SqliteQueryResult> for ExecResult {
}

pub(crate) fn sqlx_query(stmt: &Statement) -> sqlx::query::Query<'_, Sqlite, SqlxValues> {
if let Some(values) = &stmt.values {
sqlx::query_with(&stmt.sql, SqlxValues(values.clone()))
} else {
sqlx::query_with(&stmt.sql, SqlxValues(Values(Vec::new())))
}
let values = stmt
.values
.as_ref()
.map_or(Values(Vec::new()), |values| values.clone());
sqlx::query_with(&stmt.sql, SqlxValues(values))
}

0 comments on commit ecbd7c2

Please sign in to comment.