pub struct Context {
pub quoter: Quoter,
/* private fields */
}Fields§
§quoter: QuoterImplementations§
source§impl Context
impl Context
pub fn new(schema: String) -> Self
pub fn quote(&self, str: &String) -> String
pub fn get_default_schema(&self) -> String
pub fn table_name_with_schema(&self, name: &String) -> String
pub fn is_table_name_equal(&self, table1: &String, table2: &String) -> bool
pub fn sql_column( &self, col: &Column, inline_pk: bool, auto_incr_str: Option<&str>, fn_sql_type: fn(col: &Column) -> String, ) -> String
pub fn sql_add_column( &self, table_name: &String, column: &Column, auto_incr_str: Option<&str>, fn_sql_type: fn(col: &Column) -> String, ) -> String
pub fn sql_drop_column( &self, table_name: &String, column_name: &String, ) -> String
pub fn sql_alter_column( &self, table_name: &String, old: &Column, new: &Column, fn_sql_type: fn(col: &Column) -> String, ignore_default: bool, ) -> Result<Vec<String>>
pub fn sql_drop_table(&self, table_name: &String) -> String
pub fn sql_create_index( &self, table_name: &String, index: &Index, ) -> Option<String>
pub fn sql_drop_index(&self, index_name_with_schema: &String) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more