pub struct LocalWAL { /* private fields */ }Expand description
A serialized WAL buffer backed by an in-memory byte vector.
Records are written in the same binary format as the global WAL
(see WAL::flush_to_disk()), so the buffer can be bulk-copied
directly into the global WAL file on commit.
Implementations§
Source§impl LocalWAL
impl LocalWAL
Sourcepub fn log_record(&mut self, record: &WALRecord)
pub fn log_record(&mut self, record: &WALRecord)
Log a pre-built record (drain path for typed SQL-path records, P60.2).
Sourcepub fn log_insert(&mut self, table_id: u64, data: Vec<u8>)
pub fn log_insert(&mut self, table_id: u64, data: Vec<u8>)
Log a table row insertion.
Sourcepub fn log_delete(&mut self, table_id: u64, row_id: u64)
pub fn log_delete(&mut self, table_id: u64, row_id: u64)
Log a table row deletion.
Sourcepub fn log_update(
&mut self,
table_id: u64,
row_id: u64,
column: u32,
data: Vec<u8>,
)
pub fn log_update( &mut self, table_id: u64, row_id: u64, column: u32, data: Vec<u8>, )
Log a table row update.
Sourcepub fn log_column_write(
&mut self,
table_id: u64,
col_id: u32,
page_id: u64,
data: Vec<u8>,
)
pub fn log_column_write( &mut self, table_id: u64, col_id: u32, page_id: u64, data: Vec<u8>, )
Log a column page write.
Sourcepub fn log_begin_transaction(&mut self)
pub fn log_begin_transaction(&mut self)
Log the beginning of a write transaction.
Sourcepub fn log_commit(&mut self, transaction_id: u64)
pub fn log_commit(&mut self, transaction_id: u64)
Log a commit (will be flushed to global WAL on commit).
Sourcepub fn log_rollback(&mut self, transaction_id: u64)
pub fn log_rollback(&mut self, transaction_id: u64)
Log a rollback.
Sourcepub fn log_checkpoint(&mut self)
pub fn log_checkpoint(&mut self)
Log a checkpoint marker.
Sourcepub fn into_buffer(self) -> Vec<u8> ⓘ
pub fn into_buffer(self) -> Vec<u8> ⓘ
Consume and return the serialized buffer (for bulk-copy to global WAL).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LocalWAL
impl RefUnwindSafe for LocalWAL
impl Send for LocalWAL
impl Sync for LocalWAL
impl Unpin for LocalWAL
impl UnsafeUnpin for LocalWAL
impl UnwindSafe for LocalWAL
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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