This commit is contained in:
Billy Chan 2022-10-18 19:03:50 +08:00
parent 34ba0229cd
commit 4df9a2672a
No known key found for this signature in database
GPG Key ID: A2D690CAC7DF3CC7
4 changed files with 4 additions and 4 deletions

View File

@ -35,7 +35,7 @@ clap = { version = "^3.2", features = ["env", "derive"] }
dotenvy = { version = "^0.15", optional = true }
async-std = { version = "^1.9", features = [ "attributes", "tokio1" ], optional = true }
sea-orm-codegen = { version = "^0.10.0", path = "../sea-orm-codegen", optional = true }
sea-schema = { version = "^0.9.3" }
sea-schema = { version = "^0.10.0", git = "https://github.com/SeaQL/sea-schema", branch = "sea-query-0.27" }
sqlx = { version = "^0.6", default-features = false, features = [ "mysql", "postgres" ], optional = true }
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tracing = { version = "0.1" }

View File

@ -17,7 +17,7 @@ name = "sea_orm_codegen"
path = "src/lib.rs"
[dependencies]
sea-query = { version = "^0.27", features = ["thread-safe"] }
sea-query = { version = "^0.27", git = "https://github.com/SeaQL/sea-query", features = ["thread-safe"] }
syn = { version = "^1", default-features = false, features = [
"derive",
"parsing",

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", git = "https://github.com/SeaQL/sea-schema", branch = "sea-query-0.27" }
sea-schema = { version = "^0.10.0", 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

@ -253,7 +253,7 @@ where
type Selector = S;
fn paginate(self, db: &'db C, page_size: u64) -> Paginator<'db, C, S> {
assert!(page_size != 0, "page_size should not be zero");
let sql = &self.stmt.sql.trim()[6..];
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)