Expression

Trait Expression 

Source
pub trait Expression {
    type SqlType: TypedExpressionType;
}
Expand description

Represents a typed fragment of SQL.

Apps should not need to implement this type directly, but it may be common to use this in where clauses. Libraries should consider using infix_operator! or postfix_operator! instead of implementing this directly.

Required Associated Types§

Source

type SqlType: TypedExpressionType

The type that this expression represents in SQL

Implementations on Foreign Types§

Source§

impl<T: Expression + ?Sized> Expression for &T

Source§

impl<T: Expression + ?Sized> Expression for Box<T>

Source§

impl<T: Expression> Expression for (T₁, T₂, …, Tₙ)

Implementors§

Source§

impl Expression for now

Source§

impl Expression for today

Source§

impl<L, R, ST> Expression for Concat<L, R>
where L: Expression<SqlType = ST>, R: Expression<SqlType = ST>, ST: SqlType + TypedExpressionType,

Source§

type SqlType = ST

Source§

impl<Query, Value> Expression for UncheckedBind<Query, Value>
where Query: Expression,

Source§

impl<S, C> Expression for AliasedField<S, C>
where S: AliasSource, C: Column<Table = S::Target> + Expression,

Source§

impl<ST, I> Expression for Many<ST, I>

Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
Source§

impl<ST, T> Expression for SqlLiteral<ST, T>

Source§

type SqlType = ST

Source§

impl<T> Expression for Exists<T>
where Subselect<T, Bool>: Expression,

Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
Source§

impl<T, U> Expression for In<T, U>

Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
Source§

impl<T, U> Expression for NotIn<T, U>

Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
Source§

impl<W, T> Expression for CaseWhen<CaseWhenConditionsLeaf<W, T>, NoElseExpression>

Source§

impl<W, T, E> Expression for CaseWhen<CaseWhenConditionsLeaf<W, T>, ElseExpression<E>>

Source§

impl<W, T, Whens, E> Expression for CaseWhen<CaseWhenConditionsIntermediateNode<W, T, Whens>, E>
where CaseWhen<CaseWhenConditionsLeaf<W, T>, E>: Expression, CaseWhen<Whens, E>: Expression<SqlType = <CaseWhen<CaseWhenConditionsLeaf<W, T>, E> as Expression>::SqlType>,

Source§

type SqlType = <CaseWhen<CaseWhenConditionsLeaf<W, T>, E> as Expression>::SqlType