With #2571 merged diesel now officially supports GROUP BY causes. As mentioned in #210 we have no concrete planes for supporting HAVING clauses in the next release. I've opening this issue to just have one for HAVING clauses + write down some notes for potential contributors. So if anyone is interested in adding support for such clauses feel free to open a PR.
Steps to add support for HAVING clauses:
HavingDsl trait similar to the existing FilterDsl traitFilterDsl.HAVING clauses to our query builder:NoHavingClause similar to NoWhereClauseHavingClause<Expr> similar to WhereClause<Expr>SelectStatement containing the having clause. Default that generic parameter to NoHavingClause. Add this generic parameter to all impls in that file.HavingDsl for SelectStatementBoxedSelectStatement containing the boxed HAVING clauseHavingDsl for SelectStatementdiesel::dsl (Similar to diesel::dsl::Filter<Source, Filter>having method + some documentation to QueryDsl, similar to filter()diesel_testsI would like to work on this issue
@dnamsons Sure, go for it. If you hit any issue feel free to reach out for me here or in our gitter channel. Opening a WIP PR is also probably a good idea to get early feedback on the implementation.
Most helpful comment
I would like to work on this issue