pub trait GroupByDsl<Expr>where
    Expr: Expression,
{ type Output: Query; fn group_by(self, expr: Expr) -> Self::Output; }
Expand description

This trait is not yet part of Diesel’s public API. It may change in the future without a major version bump.

This trait exists as a stop-gap for users who need to use GROUP BY in their queries, so that they are not forced to drop entirely to raw SQL. The arguments to group_by are not checked, nor is the select statement forced to be valid.

Since Diesel otherwise assumes that you have no GROUP BY clause (which would mean that mixing an aggregate and non aggregate expression in the same query is an error), you may need to use sql for your select clause.

Required Associated Types

The type returned by .group_by

Required Methods

See the trait documentation.

Implementors