pub struct CatalogEngine { /* private fields */ }Implementations§
Source§impl CatalogEngine
impl CatalogEngine
pub fn new<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn new_in_memory() -> Result<Self>
pub fn read_database_header(&self) -> Result<Option<DatabaseHeader>>
pub fn initialize_database_header( &mut self, schema_root_page: u32, ) -> Result<DatabaseHeader>
pub fn allocate_table_id(&mut self) -> Result<TableId>
pub fn set_next_table_id(&mut self, next_table_id: u32) -> Result<()>
pub fn peek_next_table_id(&self) -> Result<TableId>
pub fn update_database_header<F>(&mut self, update: F) -> Result<()>where
F: FnOnce(&mut DatabaseHeader),
pub fn flush(&mut self) -> Result<()>
pub fn journal_mode(&self) -> Result<JournalMode>
pub fn set_journal_mode(&mut self, journal_mode: JournalMode) -> Result<()>
pub fn checkpoint_wal(&mut self) -> Result<()>
pub fn begin_transaction(&mut self) -> Result<()>
pub fn commit_transaction(&mut self) -> Result<()>
pub fn rollback_transaction(&mut self) -> Result<()>
pub fn transaction_active(&self) -> Result<bool>
pub fn snapshot(&self) -> Result<CatalogEngineSnapshot>
pub fn restore_snapshot( &mut self, snapshot: CatalogEngineSnapshot, ) -> Result<()>
pub fn get_storage_stats(&self) -> Result<CatalogStorageStats>
pub fn create_table(&mut self, table_name: &str) -> Result<PageId>
pub fn insert_into_table( &mut self, table_name: &str, row: Vec<Value>, ) -> Result<u64>
pub fn replace_table_rows( &mut self, table_name: &str, rows: Vec<StoredRow>, ) -> Result<()>
pub fn insert_row_with_rowid( &mut self, table_name: &str, row: StoredRow, ) -> Result<()>
pub fn delete_from_table_by_rowid( &mut self, table_name: &str, rowid: u64, ) -> Result<bool>
pub fn drop_table(&mut self, table_name: &str) -> Result<()>
pub fn drop_table_with_indexes(&mut self, table: &Table) -> Result<()>
pub fn open_table_cursor(&mut self, table_name: &str) -> Result<TableCursor>
pub fn read_rows_with_ids(&mut self, table_name: &str) -> Result<Vec<StoredRow>>
pub fn read_from_table(&mut self, table_name: &str) -> Result<Vec<Vec<Value>>>
pub fn lookup_row_by_rowid( &mut self, table_name: &str, rowid: u64, ) -> Result<Option<StoredRow>>
pub fn lookup_row_by_primary_key( &mut self, table: &Table, key_values: &[Value], ) -> Result<Option<StoredRow>>
pub fn lookup_primary_key_rowid( &mut self, table: &Table, key_values: &[Value], ) -> Result<Option<u64>>
pub fn register_primary_key_row( &mut self, table: &Table, row: StoredRow, ) -> Result<()>
pub fn lookup_rows_by_secondary_index( &mut self, table: &Table, index_name: &str, key_values: &[Value], ) -> Result<Vec<StoredRow>>
pub fn lookup_secondary_index_rowids( &mut self, table: &Table, index_name: &str, key_values: &[Value], ) -> Result<Vec<u64>>
pub fn register_secondary_index_row( &mut self, table: &Table, row: StoredRow, ) -> Result<()>
pub fn rebuild_primary_key_index( &mut self, table: &Table, rows: &[StoredRow], ) -> Result<()>
pub fn rebuild_secondary_indexes( &mut self, table: &Table, rows: &[StoredRow], ) -> Result<()>
pub fn delete_primary_key_row( &mut self, table: &Table, row: &StoredRow, ) -> Result<bool>
pub fn delete_secondary_index_row( &mut self, table: &Table, row: &StoredRow, ) -> Result<()>
pub fn encode_primary_key(&self, key_values: &[Value]) -> Result<Vec<u8>>
pub fn encode_secondary_index_key( &self, key_values: &[Value], ) -> Result<Vec<u8>>
pub fn open_primary_key_cursor(&mut self, table: &Table) -> Result<IndexCursor>
pub fn open_secondary_index_cursor( &mut self, table: &Table, index_name: &str, ) -> Result<IndexCursor>
pub fn validate_table_indexes(&mut self, table: &Table) -> Result<()>
pub fn validate_integrity(&mut self) -> Result<CatalogIntegrityReport>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CatalogEngine
impl RefUnwindSafe for CatalogEngine
impl Send for CatalogEngine
impl Sync for CatalogEngine
impl Unpin for CatalogEngine
impl UnsafeUnpin for CatalogEngine
impl UnwindSafe for CatalogEngine
Blanket Implementations§
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