pub enum Expression {
}Expand description
An expression: a column, a literal, an operation, a function call, a subquery.
PHP: the Utopia\Query\AST\Expression interface; each variant is one of
its implementations.
Variants§
Func(Func)
A function call.
Aliased(Aliased)
An expression with an alias.
Between(Between)
x [NOT] BETWEEN low AND high.
Binary(Binary)
A binary operation.
CaseWhen(CaseWhen)
One WHEN ... THEN ... of a CASE, on its own (no serializer
writes it outside a Conditional).
Cast(Cast)
CAST(x AS type).
Conditional(Conditional)
CASE ... END.
Exists(Exists)
[NOT] EXISTS (subquery).
In(In)
x [NOT] IN (...).
Subquery(Subquery)
A scalar subquery.
Unary(Unary)
A unary operation (prefix, or postfix like IS NULL).
Window(Window)
A window function call (... OVER (...)).
Literal(Literal)
A literal value.
Placeholder(Placeholder)
A bound parameter placeholder.
Raw(Raw)
SQL written as is.
Column(Column)
A column reference.
Star(Star)
* or table.*.
Implementations§
Trait Implementations§
Source§impl Clone for Expression
impl Clone for Expression
Source§impl Debug for Expression
impl Debug for Expression
Source§impl From<Aliased> for Expression
impl From<Aliased> for Expression
Source§impl From<Between> for Expression
impl From<Between> for Expression
Source§impl From<Binary> for Expression
impl From<Binary> for Expression
Source§impl From<CaseWhen> for Expression
impl From<CaseWhen> for Expression
Source§impl From<Column> for Expression
impl From<Column> for Expression
Source§impl From<Conditional> for Expression
impl From<Conditional> for Expression
Source§fn from(node: Conditional) -> Self
fn from(node: Conditional) -> Self
The node as an expression.
Source§impl From<Exists> for Expression
impl From<Exists> for Expression
Source§impl From<Literal> for Expression
impl From<Literal> for Expression
Source§impl From<Placeholder> for Expression
impl From<Placeholder> for Expression
Source§fn from(node: Placeholder) -> Self
fn from(node: Placeholder) -> Self
The node as an expression.
Source§impl From<Subquery> for Expression
impl From<Subquery> for Expression
Source§impl From<Window> for Expression
impl From<Window> for Expression
Source§impl PartialEq for Expression
impl PartialEq for Expression
impl StructuralPartialEq for Expression
Auto Trait Implementations§
impl !Freeze for Expression
impl Forget for Expression
impl Move for Expression
impl RefUnwindSafe for Expression
impl Send for Expression
impl Sync for Expression
impl Unpin for Expression
impl UnsafeUnpin 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