diesel/query_builder/group_by_clause.rs
1simple_clause!(
2 /// A query node indicating that no group-by clause is set.
3 NoGroupByClause,
4 /// A query node containing a group-by clause.
5 ///
6 /// ```
7 /// # #[cfg(feature = "i-implement-a-third-party-backend-and-opt-into-breaking-changes")]
8 /// # fn main() {
9 /// use diesel::query_builder::{GroupByClause, NoGroupByClause, SelectStatement};
10 ///
11 /// trait SelectionMarker {}
12 ///
13 /// impl<F, S, D, W, O, LOf, H, LC> SelectionMarker
14 /// for SelectStatement<F, S, D, W, O, LOf, NoGroupByClause, H, LC>
15 /// {
16 /// }
17 ///
18 /// impl<F, S, D, W, O, LOf, GB, H, LC> SelectionMarker
19 /// for SelectStatement<F, S, D, W, O, LOf, GroupByClause<GB>, H, LC>
20 /// {
21 /// }
22 /// # }
23 /// # #[cfg(not(feature = "i-implement-a-third-party-backend-and-opt-into-breaking-changes"))]
24 /// # fn main() {}
25 /// ```
26 GroupByClause,
27 " GROUP BY "
28);
29
30pub trait ValidGroupByClause {
31 type Expressions;
32}
33
34impl ValidGroupByClause for NoGroupByClause {
35 type Expressions = ();
36}
37
38impl<GB> ValidGroupByClause for GroupByClause<GB> {
39 type Expressions = GB;
40}