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 Expressionwhere
Atomic<*mut ()>: RefUnwindSafe,
Atomic<usize>: RefUnwindSafe,
OnceLock<Index>: RefUnwindSafe,
Atomic<u8>: RefUnwindSafe,
impl Send for Expression
impl Sync for Expression
impl Unpin for Expression
impl UnsafeUnpin for Expressionwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Expression>: UnsafeUnpin,
*const Expression is !null: UnsafeUnpin,
PhantomData<CaseWhen>: UnsafeUnpin,
*const Select is !null: UnsafeUnpin,
PhantomData<Select>: UnsafeUnpin,
*const WindowSpecification is !null: UnsafeUnpin,
PhantomData<WindowSpecification>: UnsafeUnpin,
&'static [u8]: UnsafeUnpin,
*const u8: UnsafeUnpin,
Align8<*mut ()>: UnsafeUnpin,
&'static Vtable: UnsafeUnpin,
*const ArcInner<Repr<Object>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Repr<Object>>>: UnsafeUnpin,
*const Query is !null: UnsafeUnpin,
PhantomData<Query>: UnsafeUnpin,
impl UnwindSafe for Expressionwhere
RawVecInner: UnwindSafe,
BoxRaw<Expression>: UnwindSafe,
BoxRaw<Select>: UnwindSafe,
BoxRaw<WindowSpecification>: UnwindSafe,
&'static [u8]: UnwindSafe,
*const u8: UnwindSafe,
Align8<*mut ()>: UnwindSafe,
&'static Vtable: UnwindSafe,
Arc<Repr<Object>>: UnwindSafe,
BoxRaw<Query>: UnwindSafe,
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