pub enum ExprNode<'a> {
Show 20 variants Expr(Cow<'a, Expr>), SqlExpr(Cow<'a, str>), Identifier(Cow<'a, str>), Numeric(NumericNode<'a>), QuotedString(Cow<'a, str>), TypedString { data_type: DataType, value: Cow<'a, str>, }, Between { expr: Box<ExprNode<'a>>, negated: bool, low: Box<ExprNode<'a>>, high: Box<ExprNode<'a>>, }, Like { expr: Box<ExprNode<'a>>, negated: bool, pattern: Box<ExprNode<'a>>, }, ILike { expr: Box<ExprNode<'a>>, negated: bool, pattern: Box<ExprNode<'a>>, }, BinaryOp { left: Box<ExprNode<'a>>, op: BinaryOperator, right: Box<ExprNode<'a>>, }, UnaryOp { op: UnaryOperator, expr: Box<ExprNode<'a>>, }, IsNull(Box<ExprNode<'a>>), IsNotNull(Box<ExprNode<'a>>), InList { expr: Box<ExprNode<'a>>, list: Box<InListNode<'a>>, negated: bool, }, Nested(Box<ExprNode<'a>>), Function(Box<FunctionNode<'a>>), Aggregate(Box<AggregateNode<'a>>), Exists { subquery: Box<QueryNode<'a>>, negated: bool, }, Subquery(Box<QueryNode<'a>>), Case { operand: Option<Box<ExprNode<'a>>>, when_then: Vec<(ExprNode<'a>, ExprNode<'a>)>, else_result: Option<Box<ExprNode<'a>>>, },
}

Variants§

§

Expr(Cow<'a, Expr>)

§

SqlExpr(Cow<'a, str>)

§

Identifier(Cow<'a, str>)

§

Numeric(NumericNode<'a>)

§

QuotedString(Cow<'a, str>)

§

TypedString

Fields

§data_type: DataType
§value: Cow<'a, str>
§

Between

Fields

§expr: Box<ExprNode<'a>>
§negated: bool
§low: Box<ExprNode<'a>>
§high: Box<ExprNode<'a>>
§

Like

Fields

§expr: Box<ExprNode<'a>>
§negated: bool
§pattern: Box<ExprNode<'a>>
§

ILike

Fields

§expr: Box<ExprNode<'a>>
§negated: bool
§pattern: Box<ExprNode<'a>>
§

BinaryOp

Fields

§left: Box<ExprNode<'a>>
§right: Box<ExprNode<'a>>
§

UnaryOp

Fields

§expr: Box<ExprNode<'a>>
§

IsNull(Box<ExprNode<'a>>)

§

IsNotNull(Box<ExprNode<'a>>)

§

InList

Fields

§expr: Box<ExprNode<'a>>
§list: Box<InListNode<'a>>
§negated: bool
§

Nested(Box<ExprNode<'a>>)

§

Function(Box<FunctionNode<'a>>)

§

Aggregate(Box<AggregateNode<'a>>)

§

Exists

Fields

§subquery: Box<QueryNode<'a>>
§negated: bool
§

Subquery(Box<QueryNode<'a>>)

§

Case

Fields

§operand: Option<Box<ExprNode<'a>>>
§when_then: Vec<(ExprNode<'a>, ExprNode<'a>)>
§else_result: Option<Box<ExprNode<'a>>>

Implementations§

source§

impl<'a> ExprNode<'a>

source

pub fn add<T>(self, other: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn sub<T>(self, other: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn mul<T>(self, other: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn div<T>(self, other: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn modulo<T>(self, other: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn concat<T>(self, other: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn gt<T>(self, other: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn lt<T>(self, other: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn gte<T>(self, other: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn lte<T>(self, other: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn eq<T>(self, other: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn neq<T>(self, other: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn and<T>(self, other: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn or<T>(self, other: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn bitwise_and<T>(self, other: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn bitwise_shift_left<T>(self, other: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn bitwise_shift_right<T>(self, other: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source§

impl<'a> ExprNode<'a>

source

pub fn case(self) -> CaseNode<'a>

source§

impl<'a> ExprNode<'a>

source

pub fn is_null(self) -> ExprNode<'a>

source

pub fn is_not_null(self) -> ExprNode<'a>

source§

impl<'a> ExprNode<'a>

source

pub fn like<T>(self, pattern: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn ilike<T>(self, pattern: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn not_like<T>(self, pattern: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn not_ilike<T>(self, pattern: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source§

impl<'a> ExprNode<'a>

source

pub fn nested(self) -> ExprNode<'a>

source§

impl<'a> ExprNode<'a>

source

pub fn plus(self) -> ExprNode<'a>

source

pub fn minus(self) -> ExprNode<'a>

source

pub fn negate(self) -> ExprNode<'a>

source

pub fn factorial(self) -> ExprNode<'a>

source

pub fn bitwise_not(self) -> ExprNode<'a>

source§

impl<'a> ExprNode<'a>

source

pub fn count(self) -> ExprNode<'a>

source

pub fn sum(self) -> ExprNode<'a>

source

pub fn min(self) -> ExprNode<'a>

source

pub fn max(self) -> ExprNode<'a>

source

pub fn avg(self) -> ExprNode<'a>

source

pub fn variance(self) -> ExprNode<'a>

source

pub fn stdev(self) -> ExprNode<'a>

source§

impl<'a> ExprNode<'a>

source

pub fn alias_as(self, alias: &str) -> ExprWithAliasNode<'a>

source§

impl<'a> ExprNode<'a>

source

pub fn between<T, U>(self, low: T, high: U) -> ExprNode<'a>where T: Into<ExprNode<'a>>, U: Into<ExprNode<'a>>,

source

pub fn not_between<T, U>(self, low: T, high: U) -> ExprNode<'a>where T: Into<ExprNode<'a>>, U: Into<ExprNode<'a>>,

source§

impl<'a> ExprNode<'a>

source

pub fn abs(self) -> ExprNode<'a>

source

pub fn upper(self) -> ExprNode<'a>

source

pub fn lower(self) -> ExprNode<'a>

source

pub fn initcap(self) -> ExprNode<'a>

source

pub fn ifnull<T>(self, another: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn ceil(self) -> ExprNode<'a>

source

pub fn rand(self) -> ExprNode<'a>

source

pub fn round(self) -> ExprNode<'a>

source

pub fn floor(self) -> ExprNode<'a>

source

pub fn asin(self) -> ExprNode<'a>

source

pub fn acos(self) -> ExprNode<'a>

source

pub fn atan(self) -> ExprNode<'a>

source

pub fn sin(self) -> ExprNode<'a>

source

pub fn cos(self) -> ExprNode<'a>

source

pub fn tan(self) -> ExprNode<'a>

source

pub fn left<T>(self, size: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn log<T>(self, base: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn log2(self) -> ExprNode<'a>

source

pub fn log10(self) -> ExprNode<'a>

source

pub fn ln(self) -> ExprNode<'a>

source

pub fn right<T>(self, size: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn reverse(self) -> ExprNode<'a>

source

pub fn sign(self) -> ExprNode<'a>

source

pub fn skip<T>(self, size: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn power<T>(self, pwr: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn sqrt(self) -> ExprNode<'a>

source

pub fn gcd<T>(self, right: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn lcm<T>(self, right: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn repeat<T>(self, num: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn replace<T, U>(self, old: T, new: U) -> ExprNode<'a>where T: Into<ExprNode<'a>>, U: Into<ExprNode<'a>>,

source

pub fn degrees(self) -> ExprNode<'a>

source

pub fn radians(self) -> ExprNode<'a>

source

pub fn lpad<T>(self, size: T, fill: Option<ExprNode<'a>>) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn rpad<T>(self, size: T, fill: Option<ExprNode<'a>>) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn take<T>(self, size: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn exp(self) -> ExprNode<'a>

source

pub fn substr<T>(self, start: T, count: Option<ExprNode<'a>>) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn rtrim(self, chars: Option<ExprNode<'a>>) -> ExprNode<'a>

source

pub fn ltrim(self, chars: Option<ExprNode<'a>>) -> ExprNode<'a>

source

pub fn format<T>(self, fmt: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn to_date<T>(self, format: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn to_timestamp<T>(self, format: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn to_time<T>(self, format: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn position<T>(self, format: T) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn find_idx<T>(self, sub: T, start: Option<ExprNode<'a>>) -> ExprNode<'a>where T: Into<ExprNode<'a>>,

source

pub fn cast<T>(self, data_type: T) -> ExprNode<'a>where T: Into<DataTypeNode>,

source

pub fn extract(self, field: DateTimeField) -> ExprNode<'a>

source

pub fn is_empty(self) -> ExprNode<'a>

source

pub fn last_day(self) -> ExprNode<'a>

source

pub fn entries(self) -> ExprNode<'a>

source

pub fn values(self) -> ExprNode<'a>

source§

impl<'a> ExprNode<'a>

source

pub fn in_list<T>(self, value: T) -> ExprNode<'a>where T: Into<InListNode<'a>>,

source

pub fn not_in_list<T>(self, value: T) -> ExprNode<'a>where T: Into<InListNode<'a>>,

Trait Implementations§

source§

impl<'a> Clone for ExprNode<'a>

source§

fn clone(&self) -> ExprNode<'a>

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<'a> Debug for ExprNode<'a>

source§

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

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

impl<'a> From<&'a Expr> for ExprNode<'a>

source§

fn from(expr: &'a Expr) -> ExprNode<'a>

Converts to this type from the input type.
source§

impl<'a> From<&'a str> for ExprNode<'a>

source§

fn from(expr: &'a str) -> ExprNode<'a>

Converts to this type from the input type.
source§

impl<'a> From<Expr> for ExprNode<'a>

source§

fn from(expr: Expr) -> ExprNode<'a>

Converts to this type from the input type.
source§

impl<'a> From<ExprNode<'a>> for OrderByExprList<'a>

source§

fn from(expr_node: ExprNode<'a>) -> OrderByExprList<'a>

Converts to this type from the input type.
source§

impl<'a> From<ExprNode<'a>> for OrderByExprNode<'a>

source§

fn from(expr_node: ExprNode<'a>) -> OrderByExprNode<'a>

Converts to this type from the input type.
source§

impl<'a> From<ExprNode<'a>> for SelectItemList<'a>

source§

fn from(expr_node: ExprNode<'a>) -> SelectItemList<'a>

Converts to this type from the input type.
source§

impl<'a> From<ExprNode<'a>> for SelectItemNode<'a>

source§

fn from(expr_node: ExprNode<'a>) -> SelectItemNode<'a>

Converts to this type from the input type.
source§

impl<'a> From<QueryNode<'a>> for ExprNode<'a>

source§

fn from(node: QueryNode<'a>) -> ExprNode<'a>

Converts to this type from the input type.
source§

impl<'a> From<String> for ExprNode<'a>

source§

fn from(expr: String) -> ExprNode<'a>

Converts to this type from the input type.
source§

impl<'a> From<bool> for ExprNode<'a>

source§

fn from(b: bool) -> ExprNode<'a>

Converts to this type from the input type.
source§

impl<'a> From<i64> for ExprNode<'a>

source§

fn from(n: i64) -> ExprNode<'a>

Converts to this type from the input type.
source§

impl<'a> TryFrom<ExprNode<'a>> for Expr

§

type Error = Error

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

fn try_from(expr_node: ExprNode<'a>) -> Result<Expr, Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for ExprNode<'a>

§

impl<'a> Send for ExprNode<'a>

§

impl<'a> Sync for ExprNode<'a>

§

impl<'a> Unpin for ExprNode<'a>

§

impl<'a> UnwindSafe for ExprNode<'a>

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
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.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
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, 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.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V