-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: provide support for groupby #2175
base: master
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 11081499018Details
💛 - Coveralls |
53a31da
to
352b803
Compare
fca6247
to
9eb2439
Compare
nodes = nodes.slice(skip, skip + limit); | ||
if (filter.groupBy) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will require support for connector too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. And it's implemented here.
@@ -272,6 +272,28 @@ describe('crud-with-options', function() { | |||
User.find({limit: 3}); | |||
}); | |||
|
|||
it('should allow filter with groupBy, count, max, min, sum & avg', function(done) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add test cases for when there are other filter queries too and limit and offset is also provided ? Basically to confirm whether this feature works with other features together or not. And whether it has any impact there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @samarpanB. I have added one more test to verify the change with existing filters.
82da092
to
a4872f5
Compare
Signed-off-by: Muhammad Aaqil <[email protected]>
a4872f5
to
757f670
Compare
This PR enables the loopback-datasource-juggler to add min(), max(), count(), avg() & sum() in the result.
Related PRs:
Checklist
npm test
passes on your machine