Skip to content

Commit 07f2268

Browse files
authored
fix: add "await_keyword" in paginate for "total_items" & fix "serde::Value" not found (#136)
* add await_keyword paginate for total_items * remove dsl from paginate since it is not needed * serde::Value not found * Update code.rs
1 parent a44afdd commit 07f2268

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/code.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ fn build_table_fns(
541541
542542
let page = page.max(0);
543543
let page_size = page_size.max(1);
544-
let total_items = Self::filter(filter.clone()).count().get_result(db)?;
544+
let total_items = Self::filter(filter.clone()).count().get_result(db){await_keyword}?;
545545
let items = Self::filter(filter).limit(page_size).offset(page * page_size).load::<Self>(db){await_keyword}?;
546546
547547
Ok(PaginationResult {{

src/parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ fn schema_type_to_rust_type(schema_type: String, config: &GenerationConfig) -> R
506506
"tstzrange" => "(std::collections::Bound<chrono::DateTime<chrono::Utc>>, std::collections::Bound<chrono::DateTime<chrono::Utc>>)",
507507

508508
// json
509-
"json" => "serde::Value",
509+
"json" => "serde_json::Value",
510510
"jsonb" => "serde_json::Value",
511511

512512
// misc

0 commit comments

Comments
 (0)