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

Source§

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

Source§

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

Source§

impl<T0: Expression, T1: Expression, T2: Expression> Expression for (T0, T1, T2)
where (T0::SqlType, T1::SqlType, T2::SqlType): TypedExpressionType,

Source§

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

Source§

impl<T0: Expression, T1: Expression, T2: Expression, T3: Expression> Expression for (T0, T1, T2, T3)
where (T0::SqlType, T1::SqlType, T2::SqlType, T3::SqlType): TypedExpressionType,

Source§

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

Source§

impl<T0: Expression, T1: Expression, T2: Expression, T3: Expression, T4: Expression> Expression for (T0, T1, T2, T3, T4)
where (T0::SqlType, T1::SqlType, T2::SqlType, T3::SqlType, T4::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)

Source§

impl<T0: Expression, T1: Expression, T2: Expression, T3: Expression, T4: Expression, T5: Expression> Expression for (T0, T1, T2, T3, T4, T5)
where (T0::SqlType, T1::SqlType, T2::SqlType, T3::SqlType, T4::SqlType, T5::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)

Source§

impl<T0: Expression, T1: Expression, T2: Expression, T3: Expression, T4: Expression, T5: Expression, T6: Expression> Expression for (T0, T1, T2, T3, T4, T5, T6)
where (T0::SqlType, T1::SqlType, T2::SqlType, T3::SqlType, T4::SqlType, T5::SqlType, T6::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)

Source§

impl<T0: Expression, T1: Expression, T2: Expression, T3: Expression, T4: Expression, T5: Expression, T6: Expression, T7: Expression> Expression for (T0, T1, T2, T3, T4, T5, T6, T7)
where (T0::SqlType, T1::SqlType, T2::SqlType, T3::SqlType, T4::SqlType, T5::SqlType, T6::SqlType, T7::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)

Source§

impl<T0: Expression, T1: Expression, T2: Expression, T3: Expression, T4: Expression, T5: Expression, T6: Expression, T7: Expression, T8: Expression> Expression for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
where (T0::SqlType, T1::SqlType, T2::SqlType, T3::SqlType, T4::SqlType, T5::SqlType, T6::SqlType, T7::SqlType, T8::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)

Source§

impl<T0: Expression, T1: Expression, T2: Expression, T3: Expression, T4: Expression, T5: Expression, T6: Expression, T7: Expression, T8: Expression, T9: Expression> Expression for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
where (T0::SqlType, T1::SqlType, T2::SqlType, T3::SqlType, T4::SqlType, T5::SqlType, T6::SqlType, T7::SqlType, T8::SqlType, T9::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)

Source§

impl<T0: Expression, T1: Expression, T2: Expression, T3: Expression, T4: Expression, T5: Expression, T6: Expression, T7: Expression, T8: Expression, T9: Expression, T10: Expression> Expression for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
where (T0::SqlType, T1::SqlType, T2::SqlType, T3::SqlType, T4::SqlType, T5::SqlType, T6::SqlType, T7::SqlType, T8::SqlType, T9::SqlType, T10::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)

Source§

impl<T0: Expression, T1: Expression, T2: Expression, T3: Expression, T4: Expression, T5: Expression, T6: Expression, T7: Expression, T8: Expression, T9: Expression, T10: Expression, T11: Expression> Expression for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
where (T0::SqlType, T1::SqlType, T2::SqlType, T3::SqlType, T4::SqlType, T5::SqlType, T6::SqlType, T7::SqlType, T8::SqlType, T9::SqlType, T10::SqlType, T11::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: 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> Expression for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)
where (T0::SqlType, T1::SqlType, T2::SqlType, T3::SqlType, T4::SqlType, T5::SqlType, T6::SqlType, T7::SqlType, T8::SqlType, T9::SqlType, T10::SqlType, T11::SqlType, T12::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: 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> Expression for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)
where (T0::SqlType, T1::SqlType, T2::SqlType, T3::SqlType, T4::SqlType, T5::SqlType, T6::SqlType, T7::SqlType, T8::SqlType, T9::SqlType, T10::SqlType, T11::SqlType, T12::SqlType, T13::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: 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> Expression for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)
where (T0::SqlType, T1::SqlType, T2::SqlType, T3::SqlType, T4::SqlType, T5::SqlType, T6::SqlType, T7::SqlType, T8::SqlType, T9::SqlType, T10::SqlType, T11::SqlType, T12::SqlType, T13::SqlType, T14::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: 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> Expression for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
where (T0::SqlType, T1::SqlType, T2::SqlType, T3::SqlType, T4::SqlType, T5::SqlType, T6::SqlType, T7::SqlType, T8::SqlType, T9::SqlType, T10::SqlType, T11::SqlType, T12::SqlType, T13::SqlType, T14::SqlType, T15::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 + ?Sized> Expression for Box<T>

Implementors§

Source§

impl Expression for now

Source§

impl Expression for today

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, T> Expression for SqlLiteral<ST, T>

Source§

type SqlType = ST

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