@@ -16,7 +16,7 @@ use actix_web::web::Bytes;
16
16
use backend:: { FileMeta , RowCallback , SHA512 } ;
17
17
use log:: { debug, warn} ;
18
18
use r2d2_sqlite:: SqliteConnectionManager ;
19
- use rusqlite:: { DatabaseName , NO_PARAMS , OpenFlags , named_params } ;
19
+ use rusqlite:: { named_params , params_from_iter , DatabaseName , OpenFlags } ;
20
20
use sodiumoxide:: randombytes:: randombytes;
21
21
use crate :: backend:: { self , UserID , Signature , ItemRow , ItemDisplayRow , Timestamp , ServerUser , QuotaDenyReason } ;
22
22
@@ -398,7 +398,7 @@ impl Connection
398
398
OR (user_id = :uid AND signature > :sig)
399
399
ORDER BY user_id, signature
400
400
" ) ?;
401
- rows = stmt. query_named ( named_params ! {
401
+ rows = stmt. query ( named_params ! {
402
402
"uid" : uid. bytes( ) ,
403
403
"sig" : sig. bytes( ) ,
404
404
} ) ?;
@@ -581,7 +581,7 @@ impl backend::Backend for Connection
581
581
} ;
582
582
583
583
let mut stmt = self . conn . prepare ( query) ?;
584
- let mut rows = stmt. query ( params) ?;
584
+ let mut rows = stmt. query ( params_from_iter ( params) ) ?;
585
585
586
586
587
587
let to_item_profile_row = |row : & Row < ' _ > | -> Result < ItemDisplayRow , Error > {
@@ -657,7 +657,7 @@ impl backend::Backend for Connection
657
657
} ;
658
658
659
659
let mut stmt = self . conn . prepare ( query) ?;
660
- let mut rows = stmt. query ( params) ?;
660
+ let mut rows = stmt. query ( params_from_iter ( params) ) ?;
661
661
662
662
let convert = |row : & Row < ' _ > | -> Result < ItemRow , Error > {
663
663
let item = ItemRow {
@@ -801,7 +801,7 @@ impl backend::Backend for Connection
801
801
802
802
let mut stmt = self . conn . prepare ( & query) ?;
803
803
804
- let mut rows = stmt. query_named ( & [
804
+ let mut rows = stmt. query ( & [
805
805
( ":timestamp" , & timestamp. unix_utc_ms ) ,
806
806
] ) ?;
807
807
@@ -869,7 +869,7 @@ impl backend::Backend for Connection
869
869
ORDER BY on_homepage, user_id
870
870
" ) ?;
871
871
872
- let mut rows = stmt. query ( NO_PARAMS ) ?;
872
+ let mut rows = stmt. query ( [ ] ) ?;
873
873
874
874
while let Some ( row) = rows. next ( ) ? {
875
875
let on_homepage: isize = row. get ( 2 ) ?;
@@ -1041,7 +1041,7 @@ impl backend::Backend for Connection
1041
1041
)
1042
1042
" ) ?;
1043
1043
1044
- let mut result = query. query_named ( & [
1044
+ let mut result = query. query ( & [
1045
1045
( ":user_id" , & user_id. bytes ( ) )
1046
1046
] ) ?;
1047
1047
@@ -1555,7 +1555,7 @@ fn get_follows(conn: &Connection, user_id: &UserID) -> Result<HashMap<UserID, Fo
1555
1555
WHERE p.user_id = :user_id
1556
1556
" ) ?;
1557
1557
1558
- let mut rows = stmt. query_named ( & [
1558
+ let mut rows = stmt. query ( & [
1559
1559
( ":user_id" , & user_id. bytes ( ) ) ,
1560
1560
] ) ?;
1561
1561
0 commit comments