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: 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<Name>),
Subquery(Box<Select>),
Unary(UnaryOperator, Box<Expr>),
Variable(String),
}
Variants§
Between
Binary(Box<Expr>, Operator, Box<Expr>)
Case
Cast
Collate(Box<Expr>, String)
DoublyQualified(Name, Name, Name)
Exists(Box<Select>)
FunctionCall
Fields
§
distinctness: Option<Distinctness>
§
order_by: Option<Vec<SortedColumn>>
§
filter_over: Option<FunctionTail>
FunctionCallStar
Id(Id)
InList
InSelect
InTable
IsNull(Box<Expr>)
Like
Literal(Literal)
Name(Name)
NotNull(Box<Expr>)
Parenthesized(Vec<Expr>)
Qualified(Name, Name)
Raise(ResolveType, Option<Name>)
Subquery(Box<Select>)
Unary(UnaryOperator, Box<Expr>)
Variable(String)
Implementations§
source§impl Expr
impl Expr
pub fn parenthesized(x: Expr) -> Expr
pub fn id(xt: u16, x: Token) -> Expr
pub fn collate(x: Expr, ct: u16, c: Token) -> Expr
pub fn cast(x: Expr, type_name: Type) -> Expr
pub fn binary(left: Expr, op: u16, right: Expr) -> Expr
pub fn ptr(left: Expr, op: Token, right: Expr) -> Expr
pub fn like( lhs: Expr, not: bool, op: LikeOperator, rhs: Expr, escape: Option<Expr> ) -> Expr
pub fn not_null(x: Expr, op: u16) -> Expr
pub fn unary(op: UnaryOperator, x: Expr) -> Expr
pub fn between(lhs: Expr, not: bool, start: Expr, end: Expr) -> Expr
pub fn in_list(lhs: Expr, not: bool, rhs: Option<Vec<Expr>>) -> Expr
pub fn in_select(lhs: Expr, not: bool, rhs: Select) -> Expr
pub fn in_table( lhs: Expr, not: bool, rhs: QualifiedName, args: Option<Vec<Expr>> ) -> Expr
pub fn sub_query(query: Select) -> Expr
Trait Implementations§
source§impl PartialEq for Expr
impl PartialEq for Expr
impl Eq for Expr
impl StructuralEq for Expr
impl StructuralPartialEq for Expr
Auto Trait Implementations§
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.