diesel/query_dsl/having_dsl.rs
1use crate::dsl;
2
3/// The `having` method
4///
5/// This trait should not be relied on directly by most apps. Its behavior is
6/// provided by [`QueryDsl`]. However, you may need a where clause on this trait
7/// to call `having` from generic code.
8///
9/// [`QueryDsl`]: crate::QueryDsl
10#[diagnostic::on_unimplemented(
11 note = "a `HAVING` clause requires setting a `GROUP BY` clause first"
12)]
13pub trait HavingDsl<Predicate> {
14 /// The type returned by `.having`.
15 type Output;
16
17 /// See the trait documentation.
18 fn having(self, predicate: Predicate) -> dsl::Having<Self, Predicate>;
19}