[][src]Struct mdbtools_rs::MDatabase

pub struct MDatabase {
    pub file: String,
    pub tables: HashMap<String, MTable>,
    pub sql_schema: Option<String>,
}

Database struct that holds the original filepath, tables and it's sql_schema

Fields

file: String

Filepath to the original file

tables: HashMap<String, MTable>

Hashmap of tables contained in the database

sql_schema: Option<String>

SQL schema of the database

Methods

impl MDatabase[src]

pub fn open_database(path: &str) -> MDatabase[src]

Open a database file

pub fn fetch_sql_schema(&mut self)[src]

Fetch the SQL schema

pub fn fetch_csv(&mut self, table: &str)[src]

Fetch the CSV data for a table

pub fn fetch_sql(&mut self, table: &str)[src]

Fetch the SQL data for a table

pub fn get_sql_schema(&mut self) -> String[src]

Get SQL schema It also stores inside of the MDatabase

Trait Implementations

impl Debug for MDatabase[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.