mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-26 19:41:37 +08:00
parent
b3bd775f90
commit
653e64ab98
@ -302,6 +302,12 @@ impl InnerConnection {
|
|||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "modern_sqlite")] // 3.10.0
|
||||||
|
pub fn cache_flush(&mut self) -> Result<()> {
|
||||||
|
check!(unsafe { ffi::sqlite3_db_cacheflush(self.db()) });
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(not(feature = "hooks"))]
|
#[cfg(not(feature = "hooks"))]
|
||||||
#[inline]
|
#[inline]
|
||||||
fn remove_hooks(&mut self) {}
|
fn remove_hooks(&mut self) {}
|
||||||
|
@ -868,6 +868,13 @@ impl Connection {
|
|||||||
pub fn is_busy(&self) -> bool {
|
pub fn is_busy(&self) -> bool {
|
||||||
self.db.borrow().is_busy()
|
self.db.borrow().is_busy()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Flush caches to disk mid-transaction
|
||||||
|
#[cfg(feature = "modern_sqlite")] // 3.10.0
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "modern_sqlite")))]
|
||||||
|
pub fn cache_flush(&self) -> Result<()> {
|
||||||
|
self.db.borrow_mut().cache_flush()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Debug for Connection {
|
impl fmt::Debug for Connection {
|
||||||
|
Loading…
Reference in New Issue
Block a user