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> 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more