Struct server::storage::Database
[−]
[src]
pub struct Database { pub name: String, }
Fields
name |
Methods
impl Database
fn create(name: &str) -> Result<Database, Error>
Starts the process of creating a new Database Returns database or on fail Error
fn load(name: &str) -> Result<Database, Error>
Loads already existing Database returns DataBase Error when database does not exist else the loaded DB
fn delete(&self) -> Result<(), Error>
Deletes the database folder and all its contents do not use RANDOM!!
fn create_table(&self, name: &str, columns: Vec<Column>, engine_id: EngineID) -> Result<Table, Error>
Creates a new table in the DB folder Returns with Error on fail else Table
fn load_table(&self, name: &str) -> Result<Table, Error>
calls load for table with the database path Returns with Error on fail else Table