File tree Expand file tree Collapse file tree 7 files changed +9
-9
lines changed
Expand file tree Collapse file tree 7 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ impl Conn for HttpConnection<HttpSender> {
237237impl crate :: statement:: Stmt for crate :: hrana:: Statement < HttpSender > {
238238 fn finalize ( & mut self ) { }
239239
240- async fn execute ( & mut self , params : & Params ) -> crate :: Result < usize > {
240+ async fn execute ( & self , params : & Params ) -> crate :: Result < usize > {
241241 self . execute ( params) . await
242242 }
243243
Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ where
162162 }
163163 }
164164
165- pub async fn execute ( & mut self , params : & Params ) -> crate :: Result < usize > {
165+ pub async fn execute ( & self , params : & Params ) -> crate :: Result < usize > {
166166 let mut stmt = self . inner . clone ( ) ;
167167 bind_params ( params. clone ( ) , & mut stmt) ;
168168
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ impl Stmt for LibsqlStmt {
108108 self . 0 . finalize ( ) ;
109109 }
110110
111- async fn execute ( & mut self , params : & Params ) -> Result < usize > {
111+ async fn execute ( & self , params : & Params ) -> Result < usize > {
112112 let params = params. clone ( ) ;
113113 let stmt = self . 0 . clone ( ) ;
114114
Original file line number Diff line number Diff line change @@ -654,8 +654,8 @@ async fn fetch_metas(
654654impl Stmt for RemoteStatement {
655655 fn finalize ( & mut self ) { }
656656
657- async fn execute ( & mut self , params : & Params ) -> Result < usize > {
658- if let Some ( stmt) = & mut self . local_statement {
657+ async fn execute ( & self , params : & Params ) -> Result < usize > {
658+ if let Some ( stmt) = & self . local_statement {
659659 return stmt. execute ( params. clone ( ) ) . await ;
660660 }
661661
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use crate::{Row, Rows};
88pub ( crate ) trait Stmt {
99 fn finalize ( & mut self ) ;
1010
11- async fn execute ( & mut self , params : & Params ) -> Result < usize > ;
11+ async fn execute ( & self , params : & Params ) -> Result < usize > ;
1212
1313 async fn query ( & self , params : & Params ) -> Result < Rows > ;
1414
@@ -39,7 +39,7 @@ impl Statement {
3939 }
4040
4141 /// Execute queries on the statement, check [`Connection::execute`] for usage.
42- pub async fn execute ( & mut self , params : impl IntoParams ) -> Result < usize > {
42+ pub async fn execute ( & self , params : impl IntoParams ) -> Result < usize > {
4343 tracing:: trace!( "execute for prepared statement" ) ;
4444 self . inner . execute ( & params. into_params ( ) ?) . await
4545 }
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ impl SyncedConnection {
104104#[ async_trait:: async_trait]
105105impl Conn for SyncedConnection {
106106 async fn execute ( & self , sql : & str , params : Params ) -> Result < u64 > {
107- let mut stmt = self . prepare ( sql) . await ?;
107+ let stmt = self . prepare ( sql) . await ?;
108108 stmt. execute ( params) . await . map ( |v| v as u64 )
109109 }
110110
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ impl Stmt for SyncedStatement {
2020 self . inner . finalize ( )
2121 }
2222
23- async fn execute ( & mut self , params : & Params ) -> Result < usize > {
23+ async fn execute ( & self , params : & Params ) -> Result < usize > {
2424 if self . needs_pull . load ( Ordering :: Relaxed ) {
2525 let mut context = self . context . lock ( ) . await ;
2626 crate :: sync:: try_pull ( & mut context, & self . conn ) . await ?;
You can’t perform that action at this time.
0 commit comments