pub struct Context {
pub quoter: Quoter,
/* private fields */
}
Fields§
§quoter: Quoter
Implementations§
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