pub struct Schemas<'a> {
pub schemas: BTreeMap<QualifiedIdentifier<'a>, Schema<'a>>,
pub schema_names: BTreeSet<Identifier<'a>>,
pub procedures: BTreeMap<QualifiedIdentifier<'a>, ProcedureDef<'a>>,
pub functions: BTreeMap<QualifiedIdentifier<'a>, FunctionDef<'a>>,
pub indices: BTreeMap<IndexKey<'a>, Span>,
pub types: BTreeMap<QualifiedIdentifier<'a>, TypeDef<'a>>,
pub sequences: BTreeMap<QualifiedIdentifier<'a>, ()>,
}Expand description
A description of tables, views, procedures, and functions in a schema definition file.
Fields§
§schemas: BTreeMap<QualifiedIdentifier<'a>, Schema<'a>>Map from qualified table/view name to its schema definition.
PostgreSQL: all keys are QualifiedIdentifier::Qualified; unqualified names are
stored under "public". MySQL/MariaDB/SQLite: all keys are QualifiedIdentifier::Unqualified.
schema_names: BTreeSet<Identifier<'a>>Set of schema names registered via CREATE SCHEMA (PostgreSQL only).
procedures: BTreeMap<QualifiedIdentifier<'a>, ProcedureDef<'a>>Map from qualified name to stored procedure.
functions: BTreeMap<QualifiedIdentifier<'a>, FunctionDef<'a>>Map from qualified name to stored function.
indices: BTreeMap<IndexKey<'a>, Span>Map from (table, index) to location.
types: BTreeMap<QualifiedIdentifier<'a>, TypeDef<'a>>Map from qualified type name to type definition (e.g. enums created with CREATE TYPE … AS ENUM).
sequences: BTreeMap<QualifiedIdentifier<'a>, ()>Map of sequence names registered via CREATE SEQUENCE (PostgreSQL only).
The value is () — only existence is tracked.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Schemas<'a>
impl<'a> RefUnwindSafe for Schemas<'a>
impl<'a> Send for Schemas<'a>
impl<'a> Sync for Schemas<'a>
impl<'a> Unpin for Schemas<'a>
impl<'a> UnsafeUnpin for Schemas<'a>
impl<'a> UnwindSafe for Schemas<'a>
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