Trait barrel::generators::DatabaseGenerator
[−]
[src]
pub trait DatabaseGenerator { fn create_table(name: &str) -> String; fn create_table_if_not_exists(name: &str) -> String; fn drop_table(name: &str) -> String; fn drop_table_if_exists(name: &str) -> String; fn rename_table(old: &str, new: &str) -> String; fn alter_table(name: &str) -> String; }
A module which generates SQL syntax focused around generating basic SQL database statements
Required Methods
fn create_table(name: &str) -> String
Create a new table with a name
fn create_table_if_not_exists(name: &str) -> String
Create a new table with a name, only if it doesn't exist
fn drop_table(name: &str) -> String
Drop a table with a name
fn drop_table_if_exists(name: &str) -> String
Drop a table with a name, only if it exists
fn rename_table(old: &str, new: &str) -> String
Rename a table from
fn alter_table(name: &str) -> String
Modify a table in some other way
Implementors
impl DatabaseGenerator for PGSQL