Ensure cache is flushed when closing the connection

Fix #186
This commit is contained in:
gwenn
2016-11-04 20:47:28 +01:00
parent bf8c495b69
commit ffe605150a
3 changed files with 19 additions and 1 deletions

View File

@@ -405,6 +405,7 @@ impl Connection {
///
/// Will return `Err` if the underlying SQLite call fails.
pub fn close(self) -> Result<()> {
self.flush_prepared_statement_cache();
let mut db = self.db.borrow_mut();
db.close()
}