Trait block_tools::db::use_diesel::query_dsl::GroupByDsl[][src]

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

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.

Associated Types

type Output: Query[src]

The type returned by .group_by

Loading content...

Required methods

pub fn group_by(self, expr: Expr) -> Self::Output[src]

See the trait documentation.

Loading content...

Implementors

impl<'a, ST, QS, DB, Expr> GroupByDsl<Expr> for BoxedSelectStatement<'a, ST, QS, DB> where
    DB: Backend,
    Expr: QueryFragment<DB> + AppearsOnTable<QS> + 'a,
    BoxedSelectStatement<'a, ST, QS, DB>: Query
[src]

type Output = BoxedSelectStatement<'a, ST, QS, DB>

impl<T, Expr> GroupByDsl<Expr> for T where
    T: Table + AsQuery,
    Expr: Expression,
    <T as AsQuery>::Query: GroupByDsl<Expr>, 
[src]

type Output = <<T as AsQuery>::Query as GroupByDsl<Expr>>::Output

Loading content...