pub struct StandaloneCheckpoint<'pool> { /* private fields */ }Expand description
A retained standalone connection restricted to WAL checkpoints.
It remains available below the logical-write reserve. It cannot issue arbitrary SQL or lend its connection to a caller:
ⓘ
use khive_db::ConnectionPool;
fn bypass(pool: &ConnectionPool) {
pool.open_standalone_checkpoint().unwrap()
.execute_batch("CREATE TABLE bypass(value INTEGER)");
}Implementations§
Source§impl<'pool> StandaloneCheckpoint<'pool>
impl<'pool> StandaloneCheckpoint<'pool>
Sourcepub fn run(
&self,
config: &CheckpointConfig,
state: &mut TruncateState,
) -> Result<u64, Error>
pub fn run( &self, config: &CheckpointConfig, state: &mut TruncateState, ) -> Result<u64, Error>
Run the configured checkpoint cycle and update this pool’s metrics.
Sourcepub fn passive(&self) -> Result<CheckpointResult, Error>
pub fn passive(&self) -> Result<CheckpointResult, Error>
Run the fixed PASSIVE checkpoint without logical-write admission.
Sourcepub fn truncate(&self) -> Result<CheckpointResult, Error>
pub fn truncate(&self) -> Result<CheckpointResult, Error>
Run the fixed TRUNCATE checkpoint without logical-write admission.
Auto Trait Implementations§
impl<'pool> !Freeze for StandaloneCheckpoint<'pool>
impl<'pool> !RefUnwindSafe for StandaloneCheckpoint<'pool>
impl<'pool> !Sync for StandaloneCheckpoint<'pool>
impl<'pool> !UnwindSafe for StandaloneCheckpoint<'pool>
impl<'pool> Forget for StandaloneCheckpoint<'pool>
impl<'pool> Move for StandaloneCheckpoint<'pool>
impl<'pool> Send for StandaloneCheckpoint<'pool>
impl<'pool> Unpin for StandaloneCheckpoint<'pool>
impl<'pool> UnsafeUnpin for StandaloneCheckpoint<'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