pub struct Schema { /* private fields */ }Implementations§
Source§impl Schema
impl Schema
pub fn new<S: Into<String>>(schema_name: Option<S>) -> Self
pub fn schema_name(&self) -> Option<&str>
pub fn case_sensitive_text(&self) -> bool
pub fn set_case_sensitive_text(&mut self, value: bool)
pub fn tables(&self) -> &[Table]
pub fn get_table(&self, name: &str) -> &Table
Sourcepub fn get_table_mut_checked(&mut self, name: &str) -> Option<&mut Table>
pub fn get_table_mut_checked(&mut self, name: &str) -> Option<&mut Table>
Same as get_table_mut, but returns None instead of panicking when no table
with this name exists - useful for callers (e.g. the XML parser) resolving
possibly-malformed input, where a missing table should surface as an error
rather than crash.
pub fn get_optional_table(&self, name: &str) -> Option<&Table>
pub fn all_views(&self) -> &[View]
pub fn views(&self, database_type: DatabaseType) -> Vec<View>
pub fn enum_types(&self) -> impl Iterator<Item = &EnumType>
pub fn get_enum_type(&self, type_name: &str) -> &EnumType
pub fn functions(&self) -> &[Function]
pub fn procedures(&self) -> &[Procedure]
pub fn other_sql(&self) -> &[OtherSql]
pub fn validate(&self) -> Vec<String>
Sourcepub fn sort_tables_by_name(&mut self)
pub fn sort_tables_by_name(&mut self)
Sorts the schema’s tables alphabetically by name, in place. Must be called after all
tables have been added, since it rebuilds the name -> index lookup used by get_table.
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