File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -93,7 +93,14 @@ impl StdlibRegistry {
9393 CONNECTIONS . with ( |m| {
9494 let mut map = m. borrow_mut ( ) ;
9595 if let Some ( conn) = map. get_mut ( & id) {
96- conn. execute ( & sql, rusqlite:: params_from_iter ( params) )
96+ let mut stmt = conn. prepare_cached ( & sql) . map_err ( |e| {
97+ RuntimeError :: new (
98+ RuntimeErrorKind :: InvalidOperation ( e. to_string ( ) ) ,
99+ None ,
100+ None ,
101+ )
102+ } ) ?;
103+ stmt. execute ( rusqlite:: params_from_iter ( params) )
97104 . map_err ( |e| {
98105 RuntimeError :: new (
99106 RuntimeErrorKind :: InvalidOperation ( e. to_string ( ) ) ,
@@ -161,7 +168,7 @@ impl StdlibRegistry {
161168 let rows = CONNECTIONS . with ( |m| {
162169 let mut map = m. borrow_mut ( ) ;
163170 if let Some ( conn) = map. get_mut ( & id) {
164- let mut stmt = conn. prepare ( & sql) . map_err ( |e| {
171+ let mut stmt = conn. prepare_cached ( & sql) . map_err ( |e| {
165172 RuntimeError :: new (
166173 RuntimeErrorKind :: InvalidOperation ( e. to_string ( ) ) ,
167174 None ,
You can’t perform that action at this time.
0 commit comments