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.
Trait Implementations§
source§impl Add for Box<Expression>
impl Add for Box<Expression>
§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>
§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 Mul for Box<Expression>
impl Mul for Box<Expression>
§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§fn eq(&self, other: &Expression) -> bool
fn eq(&self, other: &Expression) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for Expression
impl Serialize for Expression
source§impl Sub for Box<Expression>
impl Sub for Box<Expression>
§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
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
)