pub enum Expression {
Identifier(Identifier),
Literal(Literal),
Binary {
left: Box<Expression>,
op: BinaryOperator,
right: Box<Expression>,
span: Range<usize>,
},
Unary {
op: UnaryOperator,
expr: Box<Expression>,
span: Range<usize>,
},
FunctionCall {
name: Identifier,
args: Vec<Expression>,
span: Range<usize>,
},
Vector {
elements: Vec<Expression>,
span: Range<usize>,
},
InList {
expr: Box<Expression>,
list: Vec<Expression>,
negated: bool,
span: Range<usize>,
},
Between {
expr: Box<Expression>,
low: Box<Expression>,
high: Box<Expression>,
negated: bool,
span: Range<usize>,
},
Subquery {
query: Box<SelectStatement>,
span: Range<usize>,
},
InSubquery {
expr: Box<Expression>,
query: Box<SelectStatement>,
negated: bool,
span: Range<usize>,
},
Error {
message: Arc<str>,
span: Range<usize>,
},
}Expand description
Represents an SQL expression.
Variants§
Identifier(Identifier)
An identifier expression.
Literal(Literal)
A literal value expression.
Binary
A binary operation expression.
Fields
left: Box<Expression>The left-hand side of the binary operation.
op: BinaryOperatorThe binary operator.
right: Box<Expression>The right-hand side of the binary operation.
Unary
A unary operation expression.
FunctionCall
A function call expression.
Fields
name: IdentifierThe name of the function being called.
args: Vec<Expression>The arguments passed to the function.
Vector
Vector/Array literal.
InList
An IN expression.
Fields
expr: Box<Expression>The expression being checked.
list: Vec<Expression>The list of values to check against.
Between
A BETWEEN expression.
Fields
expr: Box<Expression>The expression being checked.
low: Box<Expression>The lower bound of the range.
high: Box<Expression>The upper bound of the range.
Subquery
A subquery expression.
Fields
query: Box<SelectStatement>The subquery SELECT statement.
InSubquery
An IN expression with a subquery.
Fields
expr: Box<Expression>The expression being checked.
query: Box<SelectStatement>The subquery to check against.
Error
An error occurred during expression parsing or building.
Implementations§
Trait Implementations§
Source§impl AsDocument for Expression
Available on crate feature oak-pretty-print only.
impl AsDocument for Expression
oak-pretty-print only.Source§fn as_document(&self) -> Document<'_>
fn as_document(&self) -> Document<'_>
Source§impl Clone for Expression
impl Clone for Expression
Source§fn clone(&self) -> Expression
fn clone(&self) -> Expression
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more