pub struct NativeDatabase { /* private fields */ }Implementations§
Source§impl NativeDatabase
impl NativeDatabase
pub fn as_ptr(&self) -> *mut sqlite3
pub fn take_last_kv_error(&self) -> Option<String>
pub fn sqlite_vfs_metrics(&self) -> SqliteVfsMetricsSnapshot
pub fn round_trip_counts(&self) -> SqliteRoundTripCounts
Sourcepub fn cached_page_bytes(&self) -> u64
pub fn cached_page_bytes(&self) -> u64
Bytes held by the VFS page buffers, which hold only durable copies.
Sourcepub fn cork_commits(&self)
pub fn cork_commits(&self)
Frees the pager’s unpinned pages and the VFS page buffers for an idle database. Returns
false without releasing while a write is buffered; the caller must also skip the release
while an explicit transaction is open. Every released page is a durable copy that the
next read fetches again.
Holds every later commit in memory until uncork_commits, which sends them to depot as
one commit. The transactions are committed for this connection meanwhile, but none is
durable, so nothing may report them done until uncorking succeeds.
Sourcepub fn uncork_commits(&self) -> Result<()>
pub fn uncork_commits(&self) -> Result<()>
Sends the transactions committed since cork_commits to depot as one commit. Must run
outside a transaction.
Sends every commit made since cork_commits to depot as one commit.
Fails while the connection has an open transaction, because its pages may still sit in SQLite’s page cache where the VFS cannot see them.