pub struct MDatabase {
pub file: String,
pub tables: HashMap<String, MTable>,
pub sql_schema: Option<String>,
}Expand description
Database struct that holds the original filepath, tables and it’s sql_schema
Fields§
§file: StringFilepath to the original file
tables: HashMap<String, MTable>Hashmap of tables contained in the database
sql_schema: Option<String>SQL schema of the database
Implementations§
Source§impl MDatabase
impl MDatabase
Sourcepub fn open_database(path: &str) -> MDatabase
pub fn open_database(path: &str) -> MDatabase
Open a database file
Sourcepub fn fetch_sql_schema(&mut self)
pub fn fetch_sql_schema(&mut self)
Fetch the SQL schema
Sourcepub fn get_sql_schema(&mut self) -> String
pub fn get_sql_schema(&mut self) -> String
Get SQL schema It also stores inside of the MDatabase
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MDatabase
impl RefUnwindSafe for MDatabase
impl Send for MDatabase
impl Sync for MDatabase
impl Unpin for MDatabase
impl UnwindSafe for MDatabase
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