pub struct CheckpointGuard<'pool> { /* private fields */ }Expand description
A zero-wait checkout that can run only the fixed checkpoint recovery pragmas. The connection remains private: exposing it would let a caller execute logical writes without disk-reserve admission (ADR-154 §5).
Ordinary SQL is deliberately unavailable through this capability:
ⓘ
use khive_db::{ConnectionPool, PoolConfig};
let pool = ConnectionPool::new(PoolConfig::default()).unwrap();
pool.try_checkpoint_nowait().unwrap().execute_batch("CREATE TABLE bypass (id INTEGER)");Implementations§
Source§impl CheckpointGuard<'_>
impl CheckpointGuard<'_>
Sourcepub fn passive(&self) -> Result<CheckpointResult, SqliteError>
pub fn passive(&self) -> Result<CheckpointResult, SqliteError>
Run a PASSIVE checkpoint without disk-reserve admission.
Sourcepub fn truncate(&self) -> Result<CheckpointResult, SqliteError>
pub fn truncate(&self) -> Result<CheckpointResult, SqliteError>
Run a TRUNCATE checkpoint without disk-reserve admission.
Auto Trait Implementations§
impl<'pool> !RefUnwindSafe for CheckpointGuard<'pool>
impl<'pool> !Sync for CheckpointGuard<'pool>
impl<'pool> !UnwindSafe for CheckpointGuard<'pool>
impl<'pool> Forget for CheckpointGuard<'pool>
impl<'pool> Freeze for CheckpointGuard<'pool>
impl<'pool> Send for CheckpointGuard<'pool>
impl<'pool> Unpin for CheckpointGuard<'pool>
impl<'pool> UnsafeUnpin for CheckpointGuard<'pool>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more