pub enum SqlExpr {
Lit(SqlLiteral),
Var(SqlIdent),
Param(Parameter),
Field(SqlIdent, SqlIdent),
Bin(Box<SqlExpr>, Box<SqlExpr>, BinOp),
Log(Box<SqlExpr>, Box<SqlExpr>, LogOp),
}Expand description
A scalar SQL expression
Variants§
Lit(SqlLiteral)
A constant expression
Var(SqlIdent)
Unqualified column ref
Param(Parameter)
A parameter prefixed with :
Field(SqlIdent, SqlIdent)
Qualified column ref
Bin(Box<SqlExpr>, Box<SqlExpr>, BinOp)
A binary infix expression
Log(Box<SqlExpr>, Box<SqlExpr>, LogOp)
A binary logic expression
Implementations§
Source§impl SqlExpr
impl SqlExpr
pub fn qualify_vars(self, with: SqlIdent) -> Self
pub fn has_unqualified_vars(&self) -> bool
Sourcepub fn has_parameter(&self) -> bool
pub fn has_parameter(&self) -> bool
Is this AST parameterized? We need to know in order to hash subscription queries correctly.
Sourcepub fn resolve_sender(self, sender_identity: Identity) -> Self
pub fn resolve_sender(self, sender_identity: Identity) -> Self
Replace the :sender parameter with the Identity it represents
Trait Implementations§
Source§impl From<ProjectExpr> for SqlExpr
impl From<ProjectExpr> for SqlExpr
Source§fn from(value: ProjectExpr) -> Self
fn from(value: ProjectExpr) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SqlExpr
impl RefUnwindSafe for SqlExpr
impl Send for SqlExpr
impl Sync for SqlExpr
impl Unpin for SqlExpr
impl UnwindSafe for SqlExpr
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> 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