@@ -5,10 +5,10 @@ use std::ffi::CStr;
5
5
use std:: os:: raw:: c_int;
6
6
7
7
use libsqlite3_sys:: {
8
- sqlite3_bind_parameter_count, sqlite3_column_count , sqlite3_column_decltype ,
9
- sqlite3_column_name, sqlite3_finalize, sqlite3_prepare_v3, sqlite3_reset , sqlite3_step ,
10
- sqlite3_stmt, SQLITE_DONE , SQLITE_OK , SQLITE_PREPARE_NO_VTAB , SQLITE_PREPARE_PERSISTENT ,
11
- SQLITE_ROW ,
8
+ sqlite3_bind_parameter_count, sqlite3_clear_bindings , sqlite3_column_count ,
9
+ sqlite3_column_decltype , sqlite3_column_name, sqlite3_finalize, sqlite3_prepare_v3,
10
+ sqlite3_reset , sqlite3_step , sqlite3_stmt, SQLITE_DONE , SQLITE_OK , SQLITE_PREPARE_NO_VTAB ,
11
+ SQLITE_PREPARE_PERSISTENT , SQLITE_ROW ,
12
12
} ;
13
13
14
14
use crate :: sqlite:: worker:: Worker ;
@@ -160,12 +160,16 @@ impl SqliteStatement {
160
160
161
161
pub ( super ) fn reset ( & mut self ) {
162
162
// https://sqlite.org/c3ref/reset.html
163
+ // https://sqlite.org/c3ref/clear_bindings.html
163
164
164
165
// the status value of reset is ignored because it merely propagates
165
166
// the status of the most recently invoked step function
166
167
167
168
#[ allow( unsafe_code) ]
168
169
let _ = unsafe { sqlite3_reset ( self . handle ( ) ) } ;
170
+
171
+ #[ allow( unsafe_code) ]
172
+ let _ = unsafe { sqlite3_clear_bindings ( self . handle ( ) ) } ;
169
173
}
170
174
171
175
pub ( super ) async fn step ( & mut self ) -> crate :: Result < Step > {
0 commit comments