pub struct Schema { /* private fields */ }Expand description
Everything the database says about itself.
Implementations§
Source§impl Schema
impl Schema
pub fn objects(&self) -> &[SchemaObject]
Sourcepub fn tables(&self) -> impl Iterator<Item = &SchemaObject>
pub fn tables(&self) -> impl Iterator<Item = &SchemaObject>
Every table, SQLite’s own bookkeeping included. Callers that mean
the user’s data want user_tables.
Sourcepub fn user_tables(&self) -> impl Iterator<Item = &SchemaObject>
pub fn user_tables(&self) -> impl Iterator<Item = &SchemaObject>
Every table that holds the user’s own data.
Sourcepub fn indexes(&self) -> impl Iterator<Item = &SchemaObject>
pub fn indexes(&self) -> impl Iterator<Item = &SchemaObject>
Every index in the schema, the ones SQLite made for itself included. Those have no statement of their own, which is how they are told apart.
Sourcepub fn object(&self, name: &str) -> Option<&SchemaObject>
pub fn object(&self, name: &str) -> Option<&SchemaObject>
Look an object up by name. SQLite compares identifiers without
regard to ASCII case, so track finds Track.
Sourcepub fn indexes_for(&self, table: &str) -> impl Iterator<Item = &SchemaObject>
pub fn indexes_for(&self, table: &str) -> impl Iterator<Item = &SchemaObject>
The indexes defined over table, in the order the schema lists them.
Trait Implementations§
impl StructuralPartialEq for Schema
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