Fixup
This commit is contained in:
parent
34ba0229cd
commit
4df9a2672a
@ -35,7 +35,7 @@ clap = { version = "^3.2", features = ["env", "derive"] }
|
|||||||
dotenvy = { version = "^0.15", optional = true }
|
dotenvy = { version = "^0.15", optional = true }
|
||||||
async-std = { version = "^1.9", features = [ "attributes", "tokio1" ], 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-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 }
|
sqlx = { version = "^0.6", default-features = false, features = [ "mysql", "postgres" ], optional = true }
|
||||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||||
tracing = { version = "0.1" }
|
tracing = { version = "0.1" }
|
||||||
|
@ -17,7 +17,7 @@ name = "sea_orm_codegen"
|
|||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|
||||||
[dependencies]
|
[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 = [
|
syn = { version = "^1", default-features = false, features = [
|
||||||
"derive",
|
"derive",
|
||||||
"parsing",
|
"parsing",
|
||||||
|
@ -25,7 +25,7 @@ clap = { version = "^3.2", features = ["env", "derive"] }
|
|||||||
dotenvy = { version = "^0.15" }
|
dotenvy = { version = "^0.15" }
|
||||||
sea-orm = { version = "^0.10.0", path = "../", default-features = false, features = ["macros"] }
|
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-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 = { version = "0.1", features = ["log"] }
|
||||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ where
|
|||||||
type Selector = S;
|
type Selector = S;
|
||||||
fn paginate(self, db: &'db C, page_size: u64) -> Paginator<'db, C, S> {
|
fn paginate(self, db: &'db C, page_size: u64) -> Paginator<'db, C, S> {
|
||||||
assert!(page_size != 0, "page_size should not be zero");
|
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();
|
let mut query = SelectStatement::new();
|
||||||
query.expr(if let Some(values) = self.stmt.values {
|
query.expr(if let Some(values) = self.stmt.values {
|
||||||
Expr::cust_with_values(sql, values.0)
|
Expr::cust_with_values(sql, values.0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user