pub enum Expression {
Literal(Literal),
Column(Identifier),
Unary {
op: UnaryOperator,
expr: Box<Expression>,
},
Binary {
op: BinaryOperator,
left: Box<Expression>,
right: Box<Expression>,
},
Wildcard,
Aggregation {
op: AggregationOperator,
expr: Box<Expression>,
},
}
Expand description
Boolean Expressions
Variants§
Literal(Literal)
Literal
Column(Identifier)
Column
Unary
Unary operation
Fields
§
op: UnaryOperator
The unary operator
§
expr: Box<Expression>
The expression to apply the operator to
Binary
Binary operation
Fields
§
op: BinaryOperator
The binary operator
§
left: Box<Expression>
The left hand side of the operation
§
right: Box<Expression>
The right hand side of the operation
Wildcard
- expression
Aggregation
Aggregation operation
Fields
§
op: AggregationOperator
The aggregation operator
§
expr: Box<Expression>
The expression to aggregate
Implementations§
Source§impl Expression
impl Expression
Sourcepub fn alias(self, alias: &str) -> AliasedResultExpr
pub fn alias(self, alias: &str) -> AliasedResultExpr
Create an AliasedResultExpr
from an Expression
using the provided alias.
§Panics
This function will panic if the provided alias
cannot be parsed into an Identifier
.
It will also panic if self
cannot be boxed.
Trait Implementations§
Source§impl Add for Box<Expression>
impl Add for Box<Expression>
Source§type Output = Box<Expression>
type Output = Box<Expression>
The resulting type after applying the
+
operator.Source§fn add(self, rhs: Box<Expression>) -> Box<Expression>
fn add(self, rhs: Box<Expression>) -> Box<Expression>
Performs the
+
operation. Read moreSource§impl Clone for Expression
impl Clone for Expression
Source§fn clone(&self) -> Expression
fn clone(&self) -> Expression
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Expression
impl Debug for Expression
Source§impl<'de> Deserialize<'de> for Expression
impl<'de> Deserialize<'de> for Expression
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Div for Box<Expression>
impl Div for Box<Expression>
Source§type Output = Box<Expression>
type Output = Box<Expression>
The resulting type after applying the
/
operator.Source§fn div(self, rhs: Box<Expression>) -> Box<Expression>
fn div(self, rhs: Box<Expression>) -> Box<Expression>
Performs the
/
operation. Read moreSource§impl From<Expression> for Expr
impl From<Expression> for Expr
Source§fn from(expr: Expression) -> Self
fn from(expr: Expression) -> Self
Converts to this type from the input type.
Source§impl From<Expression> for FunctionArgExpr
impl From<Expression> for FunctionArgExpr
Source§fn from(expr: Expression) -> Self
fn from(expr: Expression) -> Self
Converts to this type from the input type.
Source§impl Hash for Expression
impl Hash for Expression
Source§impl Mul for Box<Expression>
impl Mul for Box<Expression>
Source§type Output = Box<Expression>
type Output = Box<Expression>
The resulting type after applying the
*
operator.Source§fn mul(self, rhs: Box<Expression>) -> Box<Expression>
fn mul(self, rhs: Box<Expression>) -> Box<Expression>
Performs the
*
operation. Read moreSource§impl PartialEq for Expression
impl PartialEq for Expression
Source§impl Serialize for Expression
impl Serialize for Expression
Source§impl Sub for Box<Expression>
impl Sub for Box<Expression>
Source§type Output = Box<Expression>
type Output = Box<Expression>
The resulting type after applying the
-
operator.Source§fn sub(self, rhs: Box<Expression>) -> Box<Expression>
fn sub(self, rhs: Box<Expression>) -> Box<Expression>
Performs the
-
operation. Read moreimpl Eq for Expression
impl StructuralPartialEq for Expression
Auto Trait Implementations§
impl Freeze for Expression
impl RefUnwindSafe for Expression
impl Send for Expression
impl Sync for Expression
impl Unpin for Expression
impl UnwindSafe for Expression
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