Trait rustorm::database::DatabaseDev
[−]
[src]
pub trait DatabaseDev {
fn get_table_sub_class(&self, schema: &str, table: &str) -> Vec<String>;
fn get_parent_table(&self, schema: &str, table: &str) -> Option<String>;
fn get_table_metadata(&self, schema: &str, table: &str, is_view: bool) -> Table;
fn get_all_tables(&self) -> Vec<(String, String, bool)>;
fn get_inherited_columns(&self, schema: &str, table: &str) -> Vec<String>;
fn dbtype_to_rust_type(&self, db_type: &str) -> (Vec<String>, String);
fn rust_type_to_dbtype(&self, rust_type: &str) -> String;
}implement this for database that you use as your development platform, to extract meta data information about the tables and their relationship to each other
Required Methods
fn get_table_sub_class(&self, schema: &str, table: &str) -> Vec<String>
Database interface use for the development process applicable to later version of postgresql where there is inheritance
fn get_parent_table(&self, schema: &str, table: &str) -> Option<String>
fn get_table_metadata(&self, schema: &str, table: &str, is_view: bool) -> Table
Build the Table object based on the extracted meta data info from database This is queries directly from the database, so this will be costly. Only used this on initialization processes
fn get_all_tables(&self) -> Vec<(String, String, bool)>
get all the tables in this database (schema, table, is_view)
fn get_inherited_columns(&self, schema: &str, table: &str) -> Vec<String>
get the inherited columns of this table
fn dbtype_to_rust_type(&self, db_type: &str) -> (Vec<String>, String)
get the equivalent postgresql database data type to rust data type returns (module, type)
fn rust_type_to_dbtype(&self, rust_type: &str) -> String
Implementors
impl DatabaseDev for Postgres