Skip to content

Commit

Permalink
Added GROUP BY support
Browse files Browse the repository at this point in the history
  • Loading branch information
Kostanos committed Nov 21, 2017
1 parent 69c46aa commit 6a69dee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ function PgRestify(config, postInitFunction) {
if (req.pgRestifyWhere){
query = query.where(req.pgRestifyWhere);
}
if (req.query.groupBy){
query = query.groupBy(req.query.groupBy);
}
query = query
.orderBy(orderBy)
.limit(pageSize)
Expand Down

0 comments on commit 6a69dee

Please sign in to comment.