pub struct SchemaManager { /* private fields */ }Expand description
Manages table schemas in memory, backed by the _schema table.
Implementations§
Source§impl SchemaManager
impl SchemaManager
pub fn get(&self, name: &str) -> Option<&TableSchema>
pub fn contains(&self, name: &str) -> bool
pub fn generation(&self) -> u64
pub fn register(&mut self, schema: TableSchema)
pub fn remove(&mut self, name: &str) -> Option<TableSchema>
pub fn table_names(&self) -> Vec<&str>
Sourcepub fn save_schema(wtx: &mut WriteTxn<'_>, schema: &TableSchema) -> Result<()>
pub fn save_schema(wtx: &mut WriteTxn<'_>, schema: &TableSchema) -> Result<()>
Persist a schema to the _schema table (called within a write txn).
Sourcepub fn delete_schema(wtx: &mut WriteTxn<'_>, name: &str) -> Result<()>
pub fn delete_schema(wtx: &mut WriteTxn<'_>, name: &str) -> Result<()>
Remove a schema from the _schema table (called within a write txn).
Sourcepub fn ensure_schema_table(wtx: &mut WriteTxn<'_>) -> Result<()>
pub fn ensure_schema_table(wtx: &mut WriteTxn<'_>) -> Result<()>
Ensure the _schema table exists (called once per write).
Auto Trait Implementations§
impl Freeze for SchemaManager
impl RefUnwindSafe for SchemaManager
impl Send for SchemaManager
impl Sync for SchemaManager
impl Unpin for SchemaManager
impl UnsafeUnpin for SchemaManager
impl UnwindSafe for SchemaManager
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