pub enum Sql {
Show 14 variants
Cast(Box<Sql>, TypeIdent),
Call(DbProcedure, Vec<Sql>),
String(String),
Number(i128),
Ident(ColumnIdent),
UnOp(SqlUnOp, Box<Sql>),
BinOp(Box<Sql>, SqlOp, Box<Sql>),
GetField(Box<Sql>, FieldIdent),
Parened(Box<Sql>),
Tuple(Vec<Sql>),
If(Box<Sql>, Box<Sql>, Box<Sql>),
Boolean(bool),
Placeholder,
Null,
}Variants§
Cast(Box<Sql>, TypeIdent)
Call(DbProcedure, Vec<Sql>)
String(String)
Number(i128)
Ident(ColumnIdent)
UnOp(SqlUnOp, Box<Sql>)
BinOp(Box<Sql>, SqlOp, Box<Sql>)
GetField(Box<Sql>, FieldIdent)
Parened(Box<Sql>)
Tuple(Vec<Sql>)
If(Box<Sql>, Box<Sql>, Box<Sql>)
Boolean(bool)
Placeholder
Null
Implementations§
Source§impl Sql
impl Sql
pub fn replace_placeholder(&mut self, to: Sql)
pub fn affected_columns(&self) -> Vec<ColumnIdent> ⓘ
pub fn all(s: impl IntoIterator<Item = Self>) -> Self
pub fn any(s: impl IntoIterator<Item = Self>) -> Self
pub fn field_name( &self, context: &SchemaItem<'_>, field: Ident<FieldKind>, rn: &RenameMap, report: &mut Report, ) -> Option<DbIdent<FieldKind>>
pub fn context_ident_name<'s>( context: &'s SchemaItem<'s>, ident: ColumnIdent, rn: &RenameMap, report: &mut Report, ) -> Option<DbIdent<FieldKind>>
Sourcepub fn ident_name<'s>(
&self,
context: &'s SchemaItem<'s>,
rn: &RenameMap,
report: &mut Report,
) -> Option<DbIdent<FieldKind>>
pub fn ident_name<'s>( &self, context: &'s SchemaItem<'s>, rn: &RenameMap, report: &mut Report, ) -> Option<DbIdent<FieldKind>>
If self == Sql::Ident(name), convert name to native
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sql
impl RefUnwindSafe for Sql
impl Send for Sql
impl Sync for Sql
impl Unpin for Sql
impl UnwindSafe for Sql
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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