Skip to content

Commit 76111b2

Browse files
committed
libsql: Reset statement in Rows drop
We need to reset the statement to be able to reuse it. Let's call reset() in Rows drop like Rusqlite does. Refs: #2135
1 parent 7f09955 commit 76111b2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libsql/src/local/rows.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ impl AsRef<Statement> for Rows {
8282
}
8383
}
8484

85+
impl Drop for Rows {
86+
fn drop(&mut self) {
87+
self.stmt.reset();
88+
}
89+
}
90+
8591
pub struct RowsFuture {
8692
pub(crate) conn: Connection,
8793
pub(crate) sql: String,

0 commit comments

Comments
 (0)