pub struct LocalStorage { /* private fields */ }Expand description
Per-transaction local storage for all modified tables.
Implementations§
Source§impl LocalStorage
impl LocalStorage
pub fn new() -> Self
pub fn get_or_create_table(&mut self, table_id: u64) -> &mut LocalTableData
pub fn get_table(&self, table_id: u64) -> Option<&LocalTableData>
pub fn is_empty(&self) -> bool
Sourcepub fn flush_to_tables(
&self,
catalog: &Arc<TableCatalog>,
txn_id: Option<u64>,
) -> Result<Vec<UndoRecord>, StorageError>
pub fn flush_to_tables( &self, catalog: &Arc<TableCatalog>, txn_id: Option<u64>, ) -> Result<Vec<UndoRecord>, StorageError>
Flush all buffered writes to the actual tables via the TableCatalog.
Called on commit. After a successful flush, the transaction’s writes
are visible to subsequent transactions.
When txn_id is Some(...), inserts/deletes are recorded in VersionInfo.
Returns undo records for potential rollback.
Trait Implementations§
Source§impl Debug for LocalStorage
impl Debug for LocalStorage
Source§impl Default for LocalStorage
impl Default for LocalStorage
Source§fn default() -> LocalStorage
fn default() -> LocalStorage
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LocalStorage
impl RefUnwindSafe for LocalStorage
impl Send for LocalStorage
impl Sync for LocalStorage
impl Unpin for LocalStorage
impl UnsafeUnpin for LocalStorage
impl UnwindSafe for LocalStorage
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