Trait barrel::backend::SqlGenerator [] [src]

pub trait SqlGenerator {
    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;
fn add_column(ex: bool, name: &str, column: &Column) -> String;
fn drop_column(name: &str) -> String;
fn rename_column(old: &str, new: &str) -> String; }

A generic SQL generator trait

Required Methods

Create a new table with a name

Create a new table with a name, only if it doesn't exist

Drop a table with a name

Drop a table with a name, only if it exists

Rename a table from to

Modify a table in some other way

Create a new column with a type

Drop an existing column from the table

Rename an existing column

Implementors