feat: provide support for groupby#2175
Open
aaqilniz wants to merge 3 commits intoloopbackio:masterfrom
Open
Conversation
Pull Request Test Coverage Report for Build 11316630714Details
💛 - Coveralls |
53a31da to
352b803
Compare
fca6247 to
9eb2439
Compare
This was referenced Aug 16, 2024
samarpanB
reviewed
Sep 1, 2024
| const limit = filter.limit || nodes.length; | ||
| // groupBy | ||
| nodes = nodes.slice(skip, skip + limit); | ||
| if (filter.groupBy) { |
Contributor
There was a problem hiding this comment.
this will require support for connector too
samarpanB
reviewed
Sep 1, 2024
| User.find({limit: 3}); | ||
| }); | ||
|
|
||
| it('should allow filter with groupBy, count, max, min, sum & avg', function(done) { |
Contributor
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
Hi, @samarpanB. I have added one more test to verify the change with existing filters.
de0259c to
720f3c9
Compare
…ject Signed-off-by: Siim Sams <siim.sams@katanamrp.com>
Signed-off-by: Muhammad Aaqil <aaqilcs102@gmail.com>
720f3c9 to
24bd657
Compare
Signed-off-by: Muhammad Aaqil <aaqilcs102@gmail.com>
a4872f5 to
757f670
Compare
757f670 to
82da092
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR enables the loopback-datasource-juggler to add min(), max(), count(), avg() & sum() in the result.
Related PRs:
Checklist
npm testpasses on your machine