Accept mode argument for checkpoint in connection api

This commit is contained in:
PThorpe92
2025-07-19 14:18:34 -04:00
committed by Jussi Saurio
parent f78c6af51a
commit 6b71efa5b6

View File

@@ -1188,13 +1188,13 @@ impl Connection {
Ok(())
}
pub fn checkpoint(&self) -> Result<CheckpointResult> {
pub fn checkpoint(&self, mode: CheckpointMode) -> Result<CheckpointResult> {
if self.closed.get() {
return Err(LimboError::InternalError("Connection closed".to_string()));
}
self.pager
.borrow()
.wal_checkpoint(self.wal_checkpoint_disabled.get())
.wal_checkpoint(self.wal_checkpoint_disabled.get(), mode)
}
/// Close a connection and checkpoint.