pub enum Expr {
Source(String),
Identifier(Ident),
CompoundIdentifier(Vec<Ident>),
IndexBy(Vec<Expr>),
Case {
operand: Option<Box<Expr>>,
cases: Vec<CaseWhen>,
else_result: Option<Box<Expr>>,
},
Subquery(Box<Query>),
}Expand description
An SQL expression of any type.
§Semantics / Type Checking
The parser does not distinguish between expressions of different types
(e.g. boolean vs string). The caller is responsible for detecting and
validating types as necessary (for example WHERE 1 vs SELECT 1=1)
See the README.md for more details.
§Equality and Hashing Does not Include Source Locations
The Expr type implements PartialEq and Eq based on the semantic value
of the expression (not bitwise comparison). This means that Expr instances
that are semantically equivalent but have different spans (locations in the
source tree) will compare as equal.
Variants§
Source(String)
Direct SQL source
Identifier(Ident)
CompoundIdentifier(Vec<Ident>)
IndexBy(Vec<Expr>)
Case
Subquery(Box<Query>)
Trait Implementations§
Source§impl Ord for Expr
impl Ord for Expr
Source§impl PartialOrd for Expr
impl PartialOrd for Expr
impl Eq for Expr
impl StructuralPartialEq for Expr
Auto Trait Implementations§
impl Freeze for Expr
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnsafeUnpin for Expr
impl UnwindSafe for Expr
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