pub struct LocalTableData { /* private fields */ }Expand description
A local table insert/update buffer for an in-progress transaction.
Stores rows as serialised byte vectors (compatible with the Value binary
format used by Column). The flush_to_tables() method deserialises and
applies them.
Implementations§
Source§impl LocalTableData
impl LocalTableData
pub fn new() -> Self
pub fn insert(&mut self, row_data: Vec<u8>)
pub fn delete(&mut self, row_id: u64)
pub fn update(&mut self, row_id: u64, row_data: Vec<u8>)
pub fn inserted_rows(&self) -> &[Vec<u8>]
pub fn deleted_row_ids(&self) -> &[u64]
pub fn updated_rows(&self) -> &HashMap<u64, Vec<u8>>
pub fn is_empty(&self) -> bool
Sourcepub fn flush_to_node_table(
&self,
table_id: u64,
node_table: &mut NodeTable,
txn_id: Option<u64>,
) -> Result<Vec<UndoRecord>, StorageError>
pub fn flush_to_node_table( &self, table_id: u64, node_table: &mut NodeTable, txn_id: Option<u64>, ) -> Result<Vec<UndoRecord>, StorageError>
Flush this table’s buffered data to a NodeTable, returning undo records.
Deserialises each buffered row from binary format and calls
node_table.insert_row_with_txn().
When txn_id is Some(...), inserts/deletes are recorded in VersionInfo.
Returns undo records so the caller can store them for potential rollback.
Sourcepub fn flush_to_rel_table(
&self,
rel_table: &mut RelTable,
) -> Result<(), StorageError>
pub fn flush_to_rel_table( &self, rel_table: &mut RelTable, ) -> Result<(), StorageError>
Flush this table’s buffered data to a RelTable.
pub fn clear(&mut self)
Trait Implementations§
Source§impl Debug for LocalTableData
impl Debug for LocalTableData
Source§impl Default for LocalTableData
impl Default for LocalTableData
Source§fn default() -> LocalTableData
fn default() -> LocalTableData
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LocalTableData
impl RefUnwindSafe for LocalTableData
impl Send for LocalTableData
impl Sync for LocalTableData
impl Unpin for LocalTableData
impl UnsafeUnpin for LocalTableData
impl UnwindSafe for LocalTableData
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