Trait diesel::prelude::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,)

§

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

source§

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

§

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

source§

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

§

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,

§

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,

§

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,

§

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,

§

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,

§

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,

§

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,

§

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,

§

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,

§

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,

§

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,

§

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,

§

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,

§

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,

§

type SqlType = <Query as Expression>::SqlType

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>

§

type SqlType = ST