pub enum Expr {
Alias(Alias),
Column(ColumnExpr),
Literal(Literal),
Binary(BinaryExpr),
Cast(Cast),
AggregateFunction(AggregateFunction),
}Variants§
Alias(Alias)
An expression with a specific name.
Column(ColumnExpr)
A named reference to a qualified filed in a schema.
Literal(Literal)
A constant value.
Binary(BinaryExpr)
A binary expression such as “age > 21”
Cast(Cast)
Casts the expression to a given type and will return a runtime error if the expression cannot be cast. This expression is guaranteed to have a fixed type.
AggregateFunction(AggregateFunction)
Represents the call of an aggregate built-in function with arguments.
Trait Implementations§
Source§impl ExprTrait for Expr
impl ExprTrait for Expr
Source§fn data_type(&self, input_schema: &Schema) -> QuillSQLResult<DataType>
fn data_type(&self, input_schema: &Schema) -> QuillSQLResult<DataType>
Get the data type of this expression, given the schema of the input
Source§fn nullable(&self, input_schema: &Schema) -> QuillSQLResult<bool>
fn nullable(&self, input_schema: &Schema) -> QuillSQLResult<bool>
Determine whether this expression is nullable, given the schema of the input
Source§fn evaluate(&self, tuple: &Tuple) -> QuillSQLResult<ScalarValue>
fn evaluate(&self, tuple: &Tuple) -> QuillSQLResult<ScalarValue>
Evaluate an expression against a Tuple
impl Eq for Expr
impl StructuralPartialEq for Expr
Auto Trait Implementations§
impl Freeze for Expr
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.