pub enum PlanExpression {
Show 15 variants
Column {
table: Option<String>,
name: String,
data_type: DataType,
},
Literal(PlanLiteral),
BinaryOp {
left: Box<PlanExpression>,
op: PlanBinaryOp,
right: Box<PlanExpression>,
},
UnaryOp {
op: PlanUnaryOp,
expr: Box<PlanExpression>,
},
Function {
name: String,
args: Vec<PlanExpression>,
return_type: DataType,
},
Cast {
expr: Box<PlanExpression>,
target_type: DataType,
},
IsNull {
expr: Box<PlanExpression>,
negated: bool,
},
Case {
operand: Option<Box<PlanExpression>>,
conditions: Vec<(PlanExpression, PlanExpression)>,
else_result: Option<Box<PlanExpression>>,
},
InList {
expr: Box<PlanExpression>,
list: Vec<PlanExpression>,
negated: bool,
},
Between {
expr: Box<PlanExpression>,
low: Box<PlanExpression>,
high: Box<PlanExpression>,
negated: bool,
},
Like {
expr: Box<PlanExpression>,
pattern: Box<PlanExpression>,
negated: bool,
},
InSubquery {
expr: Box<PlanExpression>,
subquery: Box<PlanNode>,
negated: bool,
},
Exists {
subquery: Box<PlanNode>,
negated: bool,
},
ScalarSubquery(Box<PlanNode>),
Placeholder(usize),
}Expand description
Expression in a query plan.
Variants§
Column
Literal(PlanLiteral)
BinaryOp
UnaryOp
Function
Cast
IsNull
Case
CASE expression
Fields
§
operand: Option<Box<PlanExpression>>§
conditions: Vec<(PlanExpression, PlanExpression)>§
else_result: Option<Box<PlanExpression>>InList
IN list expression (e.g., x IN (1, 2, 3))
Between
BETWEEN expression (e.g., x BETWEEN 1 AND 10)
Like
LIKE pattern matching expression
InSubquery
IN subquery expression (e.g., x IN (SELECT y FROM t))
Exists
EXISTS subquery expression
ScalarSubquery(Box<PlanNode>)
Scalar subquery (returns single value)
Placeholder(usize)
Placeholder for parameterized queries ($1, $2, etc.)
Trait Implementations§
Source§impl Clone for PlanExpression
impl Clone for PlanExpression
Source§fn clone(&self) -> PlanExpression
fn clone(&self) -> PlanExpression
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for PlanExpression
impl RefUnwindSafe for PlanExpression
impl Send for PlanExpression
impl Sync for PlanExpression
impl Unpin for PlanExpression
impl UnsafeUnpin for PlanExpression
impl UnwindSafe for PlanExpression
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