pub struct Pg;
Expand description
Postgres SQL generator backend
Trait Implementations§
Source§impl SqlGenerator for Pg
impl SqlGenerator for Pg
Source§fn create_table_if_not_exists(name: &str, schema: Option<&str>) -> String
fn create_table_if_not_exists(name: &str, schema: Option<&str>) -> String
Create a new table with a name, only if it doesn’t exist
Source§fn drop_table_if_exists(name: &str, schema: Option<&str>) -> String
fn drop_table_if_exists(name: &str, schema: Option<&str>) -> String
Drop a table with a name, only if it exists
Source§fn add_column(ex: bool, schema: Option<&str>, name: &str, tt: &Type) -> String
fn add_column(ex: bool, schema: Option<&str>, name: &str, tt: &Type) -> String
Create a new column with a type
Source§fn drop_column(name: &str) -> String
fn drop_column(name: &str) -> String
Drop an existing column from the table
Source§fn create_index(
table: &str,
schema: Option<&str>,
name: &str,
_type: &Type,
) -> String
fn create_index( table: &str, schema: Option<&str>, name: &str, _type: &Type, ) -> String
Create a multi-column index
Source§fn drop_index(name: &str) -> String
fn drop_index(name: &str) -> String
Drop a multi-column index
Source§fn add_foreign_key(
columns: &[String],
table: &str,
relation_columns: &[String],
schema: Option<&str>,
) -> String
fn add_foreign_key( columns: &[String], table: &str, relation_columns: &[String], schema: Option<&str>, ) -> String
Add a foreign key
fn add_primary_key(columns: &[String]) -> String
Auto Trait Implementations§
impl Freeze for Pg
impl RefUnwindSafe for Pg
impl Send for Pg
impl Sync for Pg
impl Unpin for Pg
impl UnwindSafe for Pg
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more