-
-
Notifications
You must be signed in to change notification settings - Fork 11
fix: support using aggregations inside orderBy and having of groupBy
#152
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
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
|
Claude finished @ymc9's task —— View job PR Review: Support aggregations in
|
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.
Pull Request Overview
This PR enhances the groupBy operation to support using aggregations inside the orderBy and having clauses, improving query flexibility for grouped data analysis.
- Added aggregation support in
havingandorderByclauses forgroupByoperations - Enhanced type definitions to support aggregations in filter contexts
- Updated validation logic to properly handle aggregation operators
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/runtime/test/schemas/basic/schema.zmodel | Added optional meta field to User model for testing |
| packages/runtime/test/schemas/basic/schema.ts | Updated schema definition to include meta field |
| packages/runtime/test/client-api/group-by.test.ts | Added comprehensive tests for aggregations in having and orderBy clauses |
| packages/runtime/src/client/query-utils.ts | Added aggregate utility function and moved extractFields |
| packages/runtime/src/client/crud/validator.ts | Enhanced validation to support aggregations in filters and having clauses |
| packages/runtime/src/client/crud/operations/group-by.ts | Updated groupBy implementation to properly handle aggregations |
| packages/runtime/src/client/crud/dialects/base.ts | Added aggregation support in filter building and order by logic |
| packages/runtime/src/client/crud-types.ts | Extended type definitions to support aggregations in filters |
| packages/runtime/src/client/contract.ts | Updated documentation for groupBy operation |
| packages/runtime/src/client/constants.ts | Added constants for logical combinators and aggregate operators |
| packages/runtime/src/client/client-impl.ts | Enabled post-processing for groupBy operations |
| packages/language/src/validators/datamodel-validator.ts | Updated error message terminology from "Array" to "List" |
|
Claude finished @ymc9's task —— View job PR Review: Support aggregations in
|
|
Claude finished @ymc9's task —— View job PR Review: Support aggregations in
|
No description provided.