pub enum CqlExpression {
Show 14 variants
Literal(CqlLiteral),
Column(CqlIdentifier),
Parameter(u32),
NamedParameter(String),
Binary {
left: Box<CqlExpression>,
operator: CqlBinaryOperator,
right: Box<CqlExpression>,
},
Unary {
operator: CqlUnaryOperator,
operand: Box<CqlExpression>,
},
Function {
name: CqlIdentifier,
args: Vec<CqlExpression>,
},
In {
expression: Box<CqlExpression>,
values: Vec<CqlExpression>,
},
Contains {
column: CqlIdentifier,
value: Box<CqlExpression>,
},
ContainsKey {
column: CqlIdentifier,
key: Box<CqlExpression>,
},
CollectionAccess {
collection: Box<CqlExpression>,
index: Box<CqlExpression>,
},
FieldAccess {
object: Box<CqlExpression>,
field: CqlIdentifier,
},
Case {
when_clauses: Vec<CqlWhenClause>,
else_clause: Option<Box<CqlExpression>>,
},
Cast {
expression: Box<CqlExpression>,
target_type: CqlDataType,
},
}Expand description
CQL expression AST
Variants§
Literal(CqlLiteral)
Literal value
Column(CqlIdentifier)
Column reference
Parameter(u32)
Parameter placeholder (?)
NamedParameter(String)
Named parameter (:name)
Binary
Binary operation (AND, OR, =, !=, <, >, etc.)
Unary
Unary operation (NOT, -)
Function
Function call
In
IN clause
Contains
CONTAINS clause
ContainsKey
CONTAINS KEY clause
CollectionAccess
Collection access [index] or [key]
FieldAccess
UDT field access (udt.field)
Case
CASE expression
Cast
Type cast (CAST)
Trait Implementations§
Source§impl Clone for CqlExpression
impl Clone for CqlExpression
Source§fn clone(&self) -> CqlExpression
fn clone(&self) -> CqlExpression
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CqlExpression
impl Debug for CqlExpression
Source§impl<'de> Deserialize<'de> for CqlExpression
impl<'de> Deserialize<'de> for CqlExpression
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 PartialEq for CqlExpression
impl PartialEq for CqlExpression
Source§fn eq(&self, other: &CqlExpression) -> bool
fn eq(&self, other: &CqlExpression) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CqlExpression
impl Serialize for CqlExpression
impl StructuralPartialEq for CqlExpression
Auto Trait Implementations§
impl Freeze for CqlExpression
impl RefUnwindSafe for CqlExpression
impl Send for CqlExpression
impl Sync for CqlExpression
impl Unpin for CqlExpression
impl UnsafeUnpin for CqlExpression
impl UnwindSafe for CqlExpression
Blanket Implementations§
impl<T> Allocation for T
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