pub struct Schema {
pub tables: HashMap<String, TableSchema>,
}Expand description
Parsed schema from schema.qail file
Fields§
§tables: HashMap<String, TableSchema>Implementations§
Source§impl Schema
impl Schema
Sourcepub fn parse_file(path: &str) -> Result<Self, String>
pub fn parse_file(path: &str) -> Result<Self, String>
Parse a schema.qail file
Sourcepub fn rls_tables(&self) -> Vec<&str>
pub fn rls_tables(&self) -> Vec<&str>
Get all table names that have RLS enabled
Sourcepub fn is_rls_table(&self, name: &str) -> bool
pub fn is_rls_table(&self, name: &str) -> bool
Check if a specific table has RLS enabled
Sourcepub fn table(&self, name: &str) -> Option<&TableSchema>
pub fn table(&self, name: &str) -> Option<&TableSchema>
Get table schema
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 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