Open mourtisma opened 1 month ago
You can try the code below
let connection = MockDatabase::new(DatabaseBackend::Postgres)
.append_query_results([[maplit::btreemap! {
"num_items" => Into::<Value>::into(1i64),
}]])
.into_connection();
Description
I am writing a basic CRUD app using SeaORM. At some point, I have a selector, used for either pagination and counting.
Here is the corresponding test:
When running the test, it panics with the following error:
Steps to Reproduce
count
or pagination when selecting recordsExpected Behavior
The count or the pagination mocks should produce a result.
Actual Behavior
The count or the pagination mocks don't seem to have effect
Reproduces How Often
Every time
Workarounds
And when using the debugger, in SeaORM's
query.rs
, there is this piece of code:And the error is:
No column for ColIdx "num_items"
Reproducible Example
A reproducible example has been added to the description.
Versions