diesel::expression

Trait ValidGrouping

Source
pub trait ValidGrouping<GroupByClause> {
    type IsAggregate;
}
Expand description

Is this expression valid for a given group by clause?

Implementations of this trait must ensure that aggregate expressions are not mixed with non-aggregate expressions.

For generic types, you can determine if your sub-expressions can appear together using the MixedAggregates trait.

GroupByClause will be a tuple containing the set of expressions appearing in the GROUP BY portion of the query. If there is no GROUP BY, it will be ().

This trait can be derived

Required Associated Types§

Source

type IsAggregate

Is this expression aggregate?

This type should always be one of the structs in the is_aggregate module. See the documentation of those structs for more details.

Implementations on Foreign Types§

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<T0, T1, T2, T3, T4, T5, T6, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2, T3, T4, T5, T6)
where T0: ValidGrouping<__GroupByClause>, (T1, T2, T3, T4, T5, T6): ValidGrouping<__GroupByClause>, T0::IsAggregate: MixedAggregates<<(T1, T2, T3, T4, T5, T6) as ValidGrouping<__GroupByClause>>::IsAggregate>,

Source§

impl<T0, T1, T2, T3, T4, T5, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2, T3, T4, T5)
where T0: ValidGrouping<__GroupByClause>, (T1, T2, T3, T4, T5): ValidGrouping<__GroupByClause>, T0::IsAggregate: MixedAggregates<<(T1, T2, T3, T4, T5) as ValidGrouping<__GroupByClause>>::IsAggregate>,

Source§

impl<T0, T1, T2, T3, T4, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2, T3, T4)
where T0: ValidGrouping<__GroupByClause>, (T1, T2, T3, T4): ValidGrouping<__GroupByClause>, T0::IsAggregate: MixedAggregates<<(T1, T2, T3, T4) as ValidGrouping<__GroupByClause>>::IsAggregate>,

Source§

type IsAggregate = <<T0 as ValidGrouping<__GroupByClause>>::IsAggregate as MixedAggregates<<(T1, T2, T3, T4) as ValidGrouping<__GroupByClause>>::IsAggregate>>::Output

Source§

impl<T0, T1, T2, T3, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2, T3)
where T0: ValidGrouping<__GroupByClause>, (T1, T2, T3): ValidGrouping<__GroupByClause>, T0::IsAggregate: MixedAggregates<<(T1, T2, T3) as ValidGrouping<__GroupByClause>>::IsAggregate>,

Source§

type IsAggregate = <<T0 as ValidGrouping<__GroupByClause>>::IsAggregate as MixedAggregates<<(T1, T2, T3) as ValidGrouping<__GroupByClause>>::IsAggregate>>::Output

Source§

impl<T0, T1, T2, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1, T2)
where T0: ValidGrouping<__GroupByClause>, (T1, T2): ValidGrouping<__GroupByClause>, T0::IsAggregate: MixedAggregates<<(T1, T2) as ValidGrouping<__GroupByClause>>::IsAggregate>,

Source§

type IsAggregate = <<T0 as ValidGrouping<__GroupByClause>>::IsAggregate as MixedAggregates<<(T1, T2) as ValidGrouping<__GroupByClause>>::IsAggregate>>::Output

Source§

impl<T0, T1, __GroupByClause> ValidGrouping<__GroupByClause> for (T0, T1)
where T0: ValidGrouping<__GroupByClause>, (T1,): ValidGrouping<__GroupByClause>, T0::IsAggregate: MixedAggregates<<(T1,) as ValidGrouping<__GroupByClause>>::IsAggregate>,

Source§

type IsAggregate = <<T0 as ValidGrouping<__GroupByClause>>::IsAggregate as MixedAggregates<<(T1,) as ValidGrouping<__GroupByClause>>::IsAggregate>>::Output

Source§

impl<T0, __GroupByClause> ValidGrouping<__GroupByClause> for (T0,)
where T0: ValidGrouping<__GroupByClause>,

Source§

type IsAggregate = <T0 as ValidGrouping<__GroupByClause>>::IsAggregate

Source§

impl<T: ValidGrouping<GB> + ?Sized, GB> ValidGrouping<GB> for &T

Source§

impl<T: ValidGrouping<GB> + ?Sized, GB> ValidGrouping<GB> for Box<T>

Implementors§

Source§

impl<L, R, __GroupByClause> ValidGrouping<__GroupByClause> for Concat<L, R>
where L: ValidGrouping<__GroupByClause>, R: ValidGrouping<__GroupByClause>, L::IsAggregate: MixedAggregates<R::IsAggregate>,

Source§

type IsAggregate = <<L as ValidGrouping<__GroupByClause>>::IsAggregate as MixedAggregates<<R as ValidGrouping<__GroupByClause>>::IsAggregate>>::Output

Source§

impl<QS, ST, DB, GB, IsAggregate> ValidGrouping<GB> for dyn BoxableExpression<QS, DB, GB, IsAggregate, SqlType = ST> + '_

Source§

type IsAggregate = IsAggregate

Source§

impl<Query, Value, GB> ValidGrouping<GB> for UncheckedBind<Query, Value>

Source§

impl<S, C1, C2> ValidGrouping<AliasedField<S, C1>> for AliasedField<S, C2>
where S: AliasSource, C1: Column<Table = S::Target>, C2: Column<Table = S::Target> + ValidGrouping<C1, IsAggregate = Yes>,

Source§

impl<S, C> ValidGrouping<()> for AliasedField<S, C>
where S: AliasSource, C: Column<Table = S::Target>,

Source§

impl<ST, I, GB> ValidGrouping<GB> for Many<ST, I>
where ST: SingleValue, I: AsExpression<ST>, I::Expression: ValidGrouping<GB>,

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

impl<ST, T, GB> ValidGrouping<GB> for SqlLiteral<ST, T>

Source§

impl<T, GB> ValidGrouping<GB> for Exists<T>
where Subselect<T, Bool>: ValidGrouping<GB>,

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

type IsAggregate = <Subselect<T, Bool> as ValidGrouping<GB>>::IsAggregate

Source§

impl<T, U, __GroupByClause> ValidGrouping<__GroupByClause> for In<T, U>
where T: ValidGrouping<__GroupByClause>, U: ValidGrouping<__GroupByClause>, T::IsAggregate: MixedAggregates<U::IsAggregate>,

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

type IsAggregate = <<T as ValidGrouping<__GroupByClause>>::IsAggregate as MixedAggregates<<U as ValidGrouping<__GroupByClause>>::IsAggregate>>::Output

Source§

impl<T, U, __GroupByClause> ValidGrouping<__GroupByClause> for NotIn<T, U>
where T: ValidGrouping<__GroupByClause>, U: ValidGrouping<__GroupByClause>, T::IsAggregate: MixedAggregates<U::IsAggregate>,

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

type IsAggregate = <<T as ValidGrouping<__GroupByClause>>::IsAggregate as MixedAggregates<<U as ValidGrouping<__GroupByClause>>::IsAggregate>>::Output

Source§

impl<Whens, E, __GroupByClause> ValidGrouping<__GroupByClause> for CaseWhen<Whens, E>
where Whens: ValidGrouping<__GroupByClause>, E: ValidGrouping<__GroupByClause>, Whens::IsAggregate: MixedAggregates<E::IsAggregate>,

Source§

type IsAggregate = <<Whens as ValidGrouping<__GroupByClause>>::IsAggregate as MixedAggregates<<E as ValidGrouping<__GroupByClause>>::IsAggregate>>::Output

Source§

impl<__GroupByClause> ValidGrouping<__GroupByClause> for now

Source§

impl<__GroupByClause> ValidGrouping<__GroupByClause> for today