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

Fields

§lhs: Box<Expr>
§not: bool
§start: Box<Expr>
§end: Box<Expr>
§

Binary(Box<Expr>, Operator, Box<Expr>)

§

Case

Fields

§base: Option<Box<Expr>>
§when_then_pairs: Vec<(Expr, Expr)>
§else_expr: Option<Box<Expr>>
§

Cast

Fields

§expr: Box<Expr>
§type_name: Type
§

Collate(Box<Expr>, String)

§

DoublyQualified(Name, Name, Name)

§

Exists(Box<Select>)

§

FunctionCall

Fields

§name: Id
§distinctness: Option<Distinctness>
§args: Option<Vec<Expr>>
§filter_over: Option<FunctionTail>
§

FunctionCallStar

Fields

§name: Id
§filter_over: Option<FunctionTail>
§

Id(Id)

§

InList

Fields

§lhs: Box<Expr>
§not: bool
§

InSelect

Fields

§lhs: Box<Expr>
§not: bool
§

InTable

Fields

§lhs: Box<Expr>
§not: bool
§args: Option<Vec<Expr>>
§

IsNull(Box<Expr>)

§

Like

Fields

§lhs: Box<Expr>
§not: bool
§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)

Implementations§

source§

impl Expr

source

pub fn parenthesized(x: Expr) -> Expr

source

pub fn id(xt: u16, x: Token) -> Expr

source

pub fn collate(x: Expr, ct: u16, c: Token) -> Expr

source

pub fn cast(x: Expr, type_name: Type) -> Expr

source

pub fn binary(left: Expr, op: u16, right: Expr) -> Expr

source

pub fn ptr(left: Expr, op: Token, right: Expr) -> Expr

source

pub fn like( lhs: Expr, not: bool, op: LikeOperator, rhs: Expr, escape: Option<Expr> ) -> Expr

source

pub fn not_null(x: Expr, op: u16) -> Expr

source

pub fn unary(op: UnaryOperator, x: Expr) -> Expr

source

pub fn between(lhs: Expr, not: bool, start: Expr, end: Expr) -> Expr

source

pub fn in_list(lhs: Expr, not: bool, rhs: Option<Vec<Expr>>) -> Expr

source

pub fn in_select(lhs: Expr, not: bool, rhs: Select) -> Expr

source

pub fn in_table( lhs: Expr, not: bool, rhs: QualifiedName, args: Option<Vec<Expr>> ) -> Expr

source

pub fn sub_query(query: Select) -> Expr

Trait Implementations§

source§

impl Clone for Expr

source§

fn clone(&self) -> Expr

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Expr

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Expr

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for Expr

source§

fn eq(&self, other: &Expr) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl ToTokens for Expr

source§

fn to_tokens<S: TokenStream>(&self, s: &mut S) -> Result<(), S::Error>

source§

fn to_fmt(&self, f: &mut Formatter<'_>) -> Result

source§

impl Eq for Expr

source§

impl StructuralEq for Expr

source§

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

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,

§

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,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.