File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -331,6 +331,7 @@ pub struct RecordingHook {
331331}
332332
333333impl RecordingHook {
334+ #[ allow( clippy:: type_complexity) ]
334335 pub fn new ( ) -> ( Self , Arc < Mutex < Vec < ( String , CrudOperation ) > > > ) {
335336 let calls = Arc :: new ( Mutex :: new ( Vec :: new ( ) ) ) ;
336337 (
Original file line number Diff line number Diff line change @@ -309,7 +309,7 @@ async fn query_builder_with_sort_and_limit() {
309309 let results = manager
310310 . query ( )
311311 . filter ( Expr :: contains ( "name" , "Sort" ) )
312- . sort ( "age" , SortDirection :: Asc )
312+ . order_by ( "age" , SortDir :: Asc )
313313 . limit ( 2 )
314314 . execute ( )
315315 . await
@@ -341,11 +341,13 @@ async fn transaction_context_batch_commit() {
341341 let iids = manager. insert_many ( & mut people) . await . expect ( "insert_many failed" ) ;
342342 assert_eq ! ( iids. len( ) , 2 ) ;
343343
344- // Fetch all and verify
344+ // Fetch all and verify using query builder with contains
345345 let results = manager
346- . get ( & [ Filter :: contains ( "name" , "TxBatch" ) ] )
346+ . query ( )
347+ . filter ( Expr :: contains ( "name" , "TxBatch" ) )
348+ . execute ( )
347349 . await
348- . expect ( "get after batch failed" ) ;
350+ . expect ( "query after batch failed" ) ;
349351 assert_eq ! ( results. len( ) , 2 ) ;
350352
351353 // Cleanup
Original file line number Diff line number Diff line change @@ -60,6 +60,12 @@ pub struct MockExecutor {
6060 pub connected : Arc < Mutex < bool > > ,
6161}
6262
63+ impl Default for MockExecutor {
64+ fn default ( ) -> Self {
65+ Self :: new ( )
66+ }
67+ }
68+
6369impl MockExecutor {
6470 pub fn new ( ) -> Self {
6571 Self {
You can’t perform that action at this time.
0 commit comments