This commit is contained in:
Billy Chan 2022-10-17 22:00:42 +08:00
parent 29da37b4f2
commit 468cbb9baf
No known key found for this signature in database
GPG Key ID: A2D690CAC7DF3CC7
3 changed files with 4 additions and 8 deletions

View File

@ -34,8 +34,8 @@ log = { version = "^0.4" }
tracing = { version = "^0.1", features = ["log"] }
rust_decimal = { version = "^1", optional = true }
sea-orm-macros = { version = "^0.10.0", path = "sea-orm-macros", optional = true }
sea-query = { version = "^0.27", features = ["thread-safe"] }
sea-query-binder = { version = "^0.2", optional = true }
sea-query = { version = "^0.27", git = "https://github.com/SeaQL/sea-query", branch = "sqlite-bind-decimals", features = ["thread-safe"] }
sea-query-binder = { version = "^0.2", git = "https://github.com/SeaQL/sea-query", branch = "sqlite-bind-decimals", optional = true }
sea-strum = { version = "^0.23", features = ["derive", "sea-orm"] }
serde = { version = "^1.0", features = ["derive"] }
serde_json = { version = "^1.0", optional = true }
@ -46,10 +46,6 @@ url = "^2.2"
once_cell = "1.8"
thiserror = "^1"
[patch.crates-io]
sea-query = { git = "https://github.com/SeaQL/sea-query", branch = "sqlite-bind-decimals" }
sea-query-binder = { git = "https://github.com/SeaQL/sea-query", branch = "sqlite-bind-decimals" }
[dev-dependencies]
smol = { version = "^1.2" }
smol-potat = { version = "^1.1" }

View File

@ -25,7 +25,7 @@ clap = { version = "^3.2", features = ["env", "derive"] }
dotenvy = { version = "^0.15" }
sea-orm = { version = "^0.10.0", path = "../", default-features = false, features = ["macros"] }
sea-orm-cli = { version = "^0.10.0", path = "../sea-orm-cli", default-features = false }
sea-schema = { version = "^0.9.3" }
sea-schema = { version = "^0.9.3", git = "https://github.com/SeaQL/sea-schema", branch = "sea-query-0.27" }
tracing = { version = "0.1", features = ["log"] }
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

View File

@ -251,7 +251,7 @@ where
{
type Selector = S;
fn paginate(self, db: &'db C, page_size: u64) -> Paginator<'db, C, S> {
let sql = &self.stmt.sql.trim()[7..];
let sql = &self.stmt.sql.trim()[6..].trim();
let mut query = SelectStatement::new();
query.expr(if let Some(values) = self.stmt.values {
Expr::cust_with_values(sql, values.0)