pub struct Schema { /* private fields */ }Expand description
The database schema: a collection of table definitions.
Implementations§
Source§impl Schema
impl Schema
Sourcepub fn add_table_in_schema(&mut self, schema_name: &str, table: TableDef)
pub fn add_table_in_schema(&mut self, schema_name: &str, table: TableDef)
Add a table definition to a specific schema namespace.
Sourcepub fn find_table(&self, name: &str) -> Option<&TableDef>
pub fn find_table(&self, name: &str) -> Option<&TableDef>
Look up a table by name (case-insensitive).
Sourcepub fn find_table_in_schema(
&self,
schema: Option<&str>,
name: &str,
) -> Option<&TableDef>
pub fn find_table_in_schema( &self, schema: Option<&str>, name: &str, ) -> Option<&TableDef>
Look up a table by optional schema-qualified name.
Sourcepub fn find_table_by_lookup_key(&self, lookup_key: &str) -> Option<&TableDef>
pub fn find_table_by_lookup_key(&self, lookup_key: &str) -> Option<&TableDef>
Look up a table by a scope lookup key produced by [table_lookup_key].
Sourcepub fn table_count(&self) -> usize
pub fn table_count(&self) -> usize
Number of tables in the schema.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnsafeUnpin for Schema
impl UnwindSafe for Schema
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