Enum sqlite3_parser::ast::Expr
source · pub enum Expr {
Show 24 variants
Between {
lhs: Box<Expr>,
not: bool,
start: Box<Expr>,
end: Box<Expr>,
},
Binary(Box<Expr>, Operator, Box<Expr>),
Case {
base: Option<Box<Expr>>,
when_then_pairs: Vec<(Expr, Expr)>,
else_expr: Option<Box<Expr>>,
},
Cast {
expr: Box<Expr>,
type_name: Option<Type>,
},
Collate(Box<Expr>, String),
DoublyQualified(Name, Name, Name),
Exists(Box<Select>),
FunctionCall {
name: Id,
distinctness: Option<Distinctness>,
args: Option<Vec<Expr>>,
order_by: Option<Vec<SortedColumn>>,
filter_over: Option<FunctionTail>,
},
FunctionCallStar {
name: Id,
filter_over: Option<FunctionTail>,
},
Id(Id),
InList {
lhs: Box<Expr>,
not: bool,
rhs: Option<Vec<Expr>>,
},
InSelect {
lhs: Box<Expr>,
not: bool,
rhs: Box<Select>,
},
InTable {
lhs: Box<Expr>,
not: bool,
rhs: QualifiedName,
args: Option<Vec<Expr>>,
},
IsNull(Box<Expr>),
Like {
lhs: Box<Expr>,
not: bool,
op: LikeOperator,
rhs: Box<Expr>,
escape: Option<Box<Expr>>,
},
Literal(Literal),
Name(Name),
NotNull(Box<Expr>),
Parenthesized(Vec<Expr>),
Qualified(Name, Name),
Raise(ResolveType, Option<Box<Expr>>),
Subquery(Box<Select>),
Unary(UnaryOperator, Box<Expr>),
Variable(String),
}
Expand description
SQL expression
Variants§
Between
BETWEEN
Binary(Box<Expr>, Operator, Box<Expr>)
binary expression
Case
CASE
expression
Fields
Cast
CAST expression
Collate(Box<Expr>, String)
COLLATE
: expression
DoublyQualified(Name, Name, Name)
schema-name.table-name.column-name
Exists(Box<Select>)
EXISTS
subquery
FunctionCall
call to a built-in function
Fields
§
distinctness: Option<Distinctness>
DISTINCT
§
order_by: Option<Vec<SortedColumn>>
ORDER BY
§
filter_over: Option<FunctionTail>
FILTER
FunctionCallStar
Function call expression with ‘*’ as arg
Id(Id)
Identifier
InList
IN
InSelect
IN
subselect
InTable
IN
table name / function
Fields
§
rhs: QualifiedName
table name
IsNull(Box<Expr>)
IS NULL
Like
LIKE
Fields
§
op: LikeOperator
operator
Literal(Literal)
Literal expression
Name(Name)
Name
NotNull(Box<Expr>)
NOT NULL
or NOTNULL
Parenthesized(Vec<Expr>)
Parenthesized subexpression
Qualified(Name, Name)
Qualified name
Raise(ResolveType, Option<Box<Expr>>)
RAISE
function call
Subquery(Box<Select>)
Subquery expression
Unary(UnaryOperator, Box<Expr>)
Unary expression
Variable(String)
Parameters
Implementations§
source§impl Expr
impl Expr
sourcepub fn parenthesized(x: Expr) -> Expr
pub fn parenthesized(x: Expr) -> Expr
Constructor
sourcepub fn like(
lhs: Expr,
not: bool,
op: LikeOperator,
rhs: Expr,
escape: Option<Expr>,
) -> Expr
pub fn like( lhs: Expr, not: bool, op: LikeOperator, rhs: Expr, escape: Option<Expr>, ) -> Expr
Constructor
sourcepub fn unary(op: UnaryOperator, x: Expr) -> Expr
pub fn unary(op: UnaryOperator, x: Expr) -> Expr
Constructor
Trait Implementations§
source§impl PartialEq for Expr
impl PartialEq 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 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.