pub struct SchemaCache {
pub tables: HashMap<QualifiedName, Table>,
pub relationships: Vec<Relationship>,
pub functions: HashMap<QualifiedName, Function>,
}Expand description
In-memory representation of a PostgreSQL database schema.
Fields§
§tables: HashMap<QualifiedName, Table>§relationships: Vec<Relationship>§functions: HashMap<QualifiedName, Function>Implementations§
Source§impl SchemaCache
impl SchemaCache
pub fn get_table(&self, schema: &str, name: &str) -> Option<&Table>
Sourcepub fn find_table(&self, name: &str, schemas: &[String]) -> Option<&Table>
pub fn find_table(&self, name: &str, schemas: &[String]) -> Option<&Table>
Find a table by unqualified name, searching schemas in order.
Sourcepub fn get_relationships(&self, table: &QualifiedName) -> Vec<&Relationship>
pub fn get_relationships(&self, table: &QualifiedName) -> Vec<&Relationship>
Get all relationships involving a table (as source or target).
pub fn get_function(&self, schema: &str, name: &str) -> Option<&Function>
Trait Implementations§
Source§impl Clone for SchemaCache
impl Clone for SchemaCache
Source§fn clone(&self) -> SchemaCache
fn clone(&self) -> SchemaCache
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SchemaCache
impl RefUnwindSafe for SchemaCache
impl Send for SchemaCache
impl Sync for SchemaCache
impl Unpin for SchemaCache
impl UnsafeUnpin for SchemaCache
impl UnwindSafe for SchemaCache
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