pub struct TablePersistence { /* private fields */ }Expand description
Registry of durable column mirrors keyed by table id.
Implementations§
Source§impl TablePersistence
impl TablePersistence
pub fn new() -> Self
Sourcepub fn remove(
&self,
table_id: u64,
db_path: &Path,
bm: &Arc<Mutex<BufferManager>>,
)
pub fn remove( &self, table_id: u64, db_path: &Path, bm: &Arc<Mutex<BufferManager>>, )
Delete the mirror files for a dropped table.
Sourcepub fn sync_node_table(
&self,
table: &mut NodeTable,
db_path: &Path,
bm: &Arc<Mutex<BufferManager>>,
page_size: usize,
) -> Result<(), StorageError>
pub fn sync_node_table( &self, table: &mut NodeTable, db_path: &Path, bm: &Arc<Mutex<BufferManager>>, page_size: usize, ) -> Result<(), StorageError>
Persist table’s rows into its durable column mirror.
Sourcepub fn load_node_table(
&self,
table: &mut NodeTable,
db_path: &Path,
bm: &Arc<Mutex<BufferManager>>,
page_size: usize,
) -> Result<bool, StorageError>
pub fn load_node_table( &self, table: &mut NodeTable, db_path: &Path, bm: &Arc<Mutex<BufferManager>>, page_size: usize, ) -> Result<bool, StorageError>
Load a node table from its durable column mirror.
Returns Ok(true) when data was loaded, Ok(false) when no mirror
exists yet (fresh table).
Sourcepub fn sync_rel_table(
&self,
table: &mut RelTable,
db_path: &Path,
bm: &Arc<Mutex<BufferManager>>,
page_size: usize,
) -> Result<(), StorageError>
pub fn sync_rel_table( &self, table: &mut RelTable, db_path: &Path, bm: &Arc<Mutex<BufferManager>>, page_size: usize, ) -> Result<(), StorageError>
Persist table’s edges + properties into its durable column mirror.
Mirror layout: [src: UInt64][dst: UInt64][prop_0..prop_n]. Deleted
edges are stored as (u64::MAX, u64::MAX) tombstones so edge indices
stay stable across restarts.
Sourcepub fn load_rel_table(
&self,
table: &mut RelTable,
db_path: &Path,
bm: &Arc<Mutex<BufferManager>>,
page_size: usize,
) -> Result<bool, StorageError>
pub fn load_rel_table( &self, table: &mut RelTable, db_path: &Path, bm: &Arc<Mutex<BufferManager>>, page_size: usize, ) -> Result<bool, StorageError>
Load a rel table from its durable column mirror.
Sourcepub fn persist_all(
&self,
catalog: &Arc<TableCatalog>,
db_path: &Path,
bm: &Arc<Mutex<BufferManager>>,
page_size: usize,
) -> Result<(), StorageError>
pub fn persist_all( &self, catalog: &Arc<TableCatalog>, db_path: &Path, bm: &Arc<Mutex<BufferManager>>, page_size: usize, ) -> Result<(), StorageError>
Sync all node + rel tables into their durable mirrors.
Sourcepub fn load_all(
&self,
catalog: &Arc<TableCatalog>,
db_path: &Path,
bm: &Arc<Mutex<BufferManager>>,
page_size: usize,
) -> Result<usize, StorageError>
pub fn load_all( &self, catalog: &Arc<TableCatalog>, db_path: &Path, bm: &Arc<Mutex<BufferManager>>, page_size: usize, ) -> Result<usize, StorageError>
Load all persisted tables from their durable mirrors.
Returns the number of tables that had persisted data.
Trait Implementations§
Source§impl Debug for TablePersistence
impl Debug for TablePersistence
Source§impl Default for TablePersistence
impl Default for TablePersistence
Source§fn default() -> TablePersistence
fn default() -> TablePersistence
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for TablePersistence
impl RefUnwindSafe for TablePersistence
impl Send for TablePersistence
impl Sync for TablePersistence
impl Unpin for TablePersistence
impl UnsafeUnpin for TablePersistence
impl UnwindSafe for TablePersistence
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