pub struct Schema {
pub params: Vec<Param>,
pub elems: Vec<Elem>,
pub external_columns: Vec<(String, String)>,
}Expand description
The registry of one database.
Fields§
§params: Vec<Param>ParamScheme rows.
elems: Vec<Elem>ElemScheme rows.
external_columns: Vec<(String, String)>ExternalTableAndColumnName: (table, column) pairs that hold external chunk ids.
Implementations§
Source§impl Schema
impl Schema
Sourcepub fn read(connection: &Connection) -> Result<Self>
pub fn read(connection: &Connection) -> Result<Self>
Reads the three registry tables.
Sourcepub fn table_params(&self, table: &str) -> impl Iterator<Item = &Param>
pub fn table_params(&self, table: &str) -> impl Iterator<Item = &Param>
The rows of a table.
Sourcepub fn is_external(&self, table: &str, column: &str) -> bool
pub fn is_external(&self, table: &str, column: &str) -> bool
Whether the column holds external chunk ids.
Sourcepub fn links(&self) -> BTreeMap<(String, String), String>
pub fn links(&self) -> BTreeMap<(String, String), String>
Id links: (table, column) → linked table.
Sourcepub fn table_names(&self) -> Vec<String>
pub fn table_names(&self) -> Vec<String>
Tables in registry order.
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