rocket_db_pools::diesel::prelude

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<'a, T> Expression for &'a T
where T: Expression + ?Sized,

Source§

impl<T0> Expression for (T0,)

Source§

impl<T0, T1> Expression for (T0, T1)

Source§

impl<T0, T1, T2> Expression for (T0, T1, T2)

Source§

type SqlType = (<T0 as Expression>::SqlType, <T1 as Expression>::SqlType, <T2 as Expression>::SqlType)

Source§

impl<T0, T1, T2, T3> Expression for (T0, T1, T2, T3)

Source§

type SqlType = (<T0 as Expression>::SqlType, <T1 as Expression>::SqlType, <T2 as Expression>::SqlType, <T3 as Expression>::SqlType)

Source§

impl<T0, T1, T2, T3, T4> Expression for (T0, T1, T2, T3, T4)

Source§

type SqlType = (<T0 as Expression>::SqlType, <T1 as Expression>::SqlType, <T2 as Expression>::SqlType, <T3 as Expression>::SqlType, <T4 as Expression>::SqlType)

Source§

impl<T0, T1, T2, T3, T4, T5> Expression for (T0, T1, T2, T3, T4, T5)

Source§

type SqlType = (<T0 as Expression>::SqlType, <T1 as Expression>::SqlType, <T2 as Expression>::SqlType, <T3 as Expression>::SqlType, <T4 as Expression>::SqlType, <T5 as Expression>::SqlType)

Source§

impl<T0, T1, T2, T3, T4, T5, T6> Expression for (T0, T1, T2, T3, T4, T5, T6)

Source§

type SqlType = (<T0 as Expression>::SqlType, <T1 as Expression>::SqlType, <T2 as Expression>::SqlType, <T3 as Expression>::SqlType, <T4 as Expression>::SqlType, <T5 as Expression>::SqlType, <T6 as Expression>::SqlType)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7> Expression for (T0, T1, T2, T3, T4, T5, T6, T7)

Source§

type SqlType = (<T0 as Expression>::SqlType, <T1 as Expression>::SqlType, <T2 as Expression>::SqlType, <T3 as Expression>::SqlType, <T4 as Expression>::SqlType, <T5 as Expression>::SqlType, <T6 as Expression>::SqlType, <T7 as Expression>::SqlType)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> Expression for (T0, T1, T2, T3, T4, T5, T6, T7, T8)

Source§

type SqlType = (<T0 as Expression>::SqlType, <T1 as Expression>::SqlType, <T2 as Expression>::SqlType, <T3 as Expression>::SqlType, <T4 as Expression>::SqlType, <T5 as Expression>::SqlType, <T6 as Expression>::SqlType, <T7 as Expression>::SqlType, <T8 as Expression>::SqlType)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> Expression for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)

Source§

type SqlType = (<T0 as Expression>::SqlType, <T1 as Expression>::SqlType, <T2 as Expression>::SqlType, <T3 as Expression>::SqlType, <T4 as Expression>::SqlType, <T5 as Expression>::SqlType, <T6 as Expression>::SqlType, <T7 as Expression>::SqlType, <T8 as Expression>::SqlType, <T9 as Expression>::SqlType)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Expression for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

Source§

type SqlType = (<T0 as Expression>::SqlType, <T1 as Expression>::SqlType, <T2 as Expression>::SqlType, <T3 as Expression>::SqlType, <T4 as Expression>::SqlType, <T5 as Expression>::SqlType, <T6 as Expression>::SqlType, <T7 as Expression>::SqlType, <T8 as Expression>::SqlType, <T9 as Expression>::SqlType, <T10 as Expression>::SqlType)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Expression for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
where T0: Expression, T1: Expression, T2: Expression, T3: Expression, T4: Expression, T5: Expression, T6: Expression, T7: Expression, T8: Expression, T9: Expression, T10: Expression, T11: Expression, (<T0 as Expression>::SqlType, <T1 as Expression>::SqlType, <T2 as Expression>::SqlType, <T3 as Expression>::SqlType, <T4 as Expression>::SqlType, <T5 as Expression>::SqlType, <T6 as Expression>::SqlType, <T7 as Expression>::SqlType, <T8 as Expression>::SqlType, <T9 as Expression>::SqlType, <T10 as Expression>::SqlType, <T11 as Expression>::SqlType): TypedExpressionType,

Source§

type SqlType = (<T0 as Expression>::SqlType, <T1 as Expression>::SqlType, <T2 as Expression>::SqlType, <T3 as Expression>::SqlType, <T4 as Expression>::SqlType, <T5 as Expression>::SqlType, <T6 as Expression>::SqlType, <T7 as Expression>::SqlType, <T8 as Expression>::SqlType, <T9 as Expression>::SqlType, <T10 as Expression>::SqlType, <T11 as Expression>::SqlType)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Expression for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)
where T0: Expression, T1: Expression, T2: Expression, T3: Expression, T4: Expression, T5: Expression, T6: Expression, T7: Expression, T8: Expression, T9: Expression, T10: Expression, T11: Expression, T12: Expression, (<T0 as Expression>::SqlType, <T1 as Expression>::SqlType, <T2 as Expression>::SqlType, <T3 as Expression>::SqlType, <T4 as Expression>::SqlType, <T5 as Expression>::SqlType, <T6 as Expression>::SqlType, <T7 as Expression>::SqlType, <T8 as Expression>::SqlType, <T9 as Expression>::SqlType, <T10 as Expression>::SqlType, <T11 as Expression>::SqlType, <T12 as Expression>::SqlType): TypedExpressionType,

Source§

type SqlType = (<T0 as Expression>::SqlType, <T1 as Expression>::SqlType, <T2 as Expression>::SqlType, <T3 as Expression>::SqlType, <T4 as Expression>::SqlType, <T5 as Expression>::SqlType, <T6 as Expression>::SqlType, <T7 as Expression>::SqlType, <T8 as Expression>::SqlType, <T9 as Expression>::SqlType, <T10 as Expression>::SqlType, <T11 as Expression>::SqlType, <T12 as Expression>::SqlType)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Expression for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)
where T0: Expression, T1: Expression, T2: Expression, T3: Expression, T4: Expression, T5: Expression, T6: Expression, T7: Expression, T8: Expression, T9: Expression, T10: Expression, T11: Expression, T12: Expression, T13: Expression, (<T0 as Expression>::SqlType, <T1 as Expression>::SqlType, <T2 as Expression>::SqlType, <T3 as Expression>::SqlType, <T4 as Expression>::SqlType, <T5 as Expression>::SqlType, <T6 as Expression>::SqlType, <T7 as Expression>::SqlType, <T8 as Expression>::SqlType, <T9 as Expression>::SqlType, <T10 as Expression>::SqlType, <T11 as Expression>::SqlType, <T12 as Expression>::SqlType, <T13 as Expression>::SqlType): TypedExpressionType,

Source§

type SqlType = (<T0 as Expression>::SqlType, <T1 as Expression>::SqlType, <T2 as Expression>::SqlType, <T3 as Expression>::SqlType, <T4 as Expression>::SqlType, <T5 as Expression>::SqlType, <T6 as Expression>::SqlType, <T7 as Expression>::SqlType, <T8 as Expression>::SqlType, <T9 as Expression>::SqlType, <T10 as Expression>::SqlType, <T11 as Expression>::SqlType, <T12 as Expression>::SqlType, <T13 as Expression>::SqlType)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Expression for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)
where T0: Expression, T1: Expression, T2: Expression, T3: Expression, T4: Expression, T5: Expression, T6: Expression, T7: Expression, T8: Expression, T9: Expression, T10: Expression, T11: Expression, T12: Expression, T13: Expression, T14: Expression, (<T0 as Expression>::SqlType, <T1 as Expression>::SqlType, <T2 as Expression>::SqlType, <T3 as Expression>::SqlType, <T4 as Expression>::SqlType, <T5 as Expression>::SqlType, <T6 as Expression>::SqlType, <T7 as Expression>::SqlType, <T8 as Expression>::SqlType, <T9 as Expression>::SqlType, <T10 as Expression>::SqlType, <T11 as Expression>::SqlType, <T12 as Expression>::SqlType, <T13 as Expression>::SqlType, <T14 as Expression>::SqlType): TypedExpressionType,

Source§

type SqlType = (<T0 as Expression>::SqlType, <T1 as Expression>::SqlType, <T2 as Expression>::SqlType, <T3 as Expression>::SqlType, <T4 as Expression>::SqlType, <T5 as Expression>::SqlType, <T6 as Expression>::SqlType, <T7 as Expression>::SqlType, <T8 as Expression>::SqlType, <T9 as Expression>::SqlType, <T10 as Expression>::SqlType, <T11 as Expression>::SqlType, <T12 as Expression>::SqlType, <T13 as Expression>::SqlType, <T14 as Expression>::SqlType)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Expression for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
where T0: Expression, T1: Expression, T2: Expression, T3: Expression, T4: Expression, T5: Expression, T6: Expression, T7: Expression, T8: Expression, T9: Expression, T10: Expression, T11: Expression, T12: Expression, T13: Expression, T14: Expression, T15: Expression, (<T0 as Expression>::SqlType, <T1 as Expression>::SqlType, <T2 as Expression>::SqlType, <T3 as Expression>::SqlType, <T4 as Expression>::SqlType, <T5 as Expression>::SqlType, <T6 as Expression>::SqlType, <T7 as Expression>::SqlType, <T8 as Expression>::SqlType, <T9 as Expression>::SqlType, <T10 as Expression>::SqlType, <T11 as Expression>::SqlType, <T12 as Expression>::SqlType, <T13 as Expression>::SqlType, <T14 as Expression>::SqlType, <T15 as Expression>::SqlType): TypedExpressionType,

Source§

type SqlType = (<T0 as Expression>::SqlType, <T1 as Expression>::SqlType, <T2 as Expression>::SqlType, <T3 as Expression>::SqlType, <T4 as Expression>::SqlType, <T5 as Expression>::SqlType, <T6 as Expression>::SqlType, <T7 as Expression>::SqlType, <T8 as Expression>::SqlType, <T9 as Expression>::SqlType, <T10 as Expression>::SqlType, <T11 as Expression>::SqlType, <T12 as Expression>::SqlType, <T13 as Expression>::SqlType, <T14 as Expression>::SqlType, <T15 as Expression>::SqlType)

Source§

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

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 as AliasSource>::Target> + Expression,

Source§

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

Source§

type SqlType = ST

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,

Source§

impl<T, U> Expression for In<T, U>
where T: Expression, U: Expression<SqlType = <T as Expression>::SqlType>,

Source§

impl<T, U> Expression for NotIn<T, U>
where T: Expression, U: Expression<SqlType = <T as Expression>::SqlType>,

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