-
-
Notifications
You must be signed in to change notification settings - Fork 12
fix: disallow distinct for sqlite #180
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: SQLite DISTINCT FixReviewing this pull request that disallows DISTINCT operations for SQLite. Tasks
SummaryThis PR implements proper SQLite DISTINCT operation handling by disallowing it where not supported and refactoring the dialect architecture for better provider-specific feature support. Key Changes1. Type System Updates (
|
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 fixes a limitation with the SQLite provider by disallowing the distinct operation, which is not supported by the SQLite dialect.
Key changes:
- Added type-level constraints to prevent
distinctfrom being available for SQLite providers - Updated test cases to handle SQLite-specific behavior and verify proper error handling
- Refactored database query building logic to consolidate filter, sort, and pagination operations
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/runtime/test/client-api/find.test.ts | Added SQLite-specific test handling and extended test coverage for distinct operations |
| packages/runtime/src/client/crud/operations/base.ts | Refactored query building logic and removed duplicate code |
| packages/runtime/src/client/crud/dialects/sqlite.ts | Simplified relation query building by using consolidated helper method |
| packages/runtime/src/client/crud/dialects/postgresql.ts | Simplified relation query building by using consolidated helper method |
| packages/runtime/src/client/crud/dialects/base.ts | Added consolidated query building method and moved cursor filter logic |
| packages/runtime/src/client/crud-types.ts | Added type-level constraints to conditionally allow distinct based on provider support |
| packages/language/src/validators/datamodel-validator.ts | Fixed non-null assertion operator usage |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
|
Claude finished @ymc9's task —— View job PR Review: SQLite DISTINCT FixReviewing this pull request that disallows DISTINCT operations for SQLite. Tasks
SummaryThis PR implements proper SQLite DISTINCT operation handling by disallowing it where not supported and refactoring the dialect architecture for better provider-specific feature support. Key Changes1. Type System Updates (
|
|
Claude finished @ymc9's task —— View job Claude finished reviewing this PR PR Review: SQLite DISTINCT FixComprehensive review of this pull request that disallows DISTINCT operations for SQLite. Tasks
SummaryThis PR implements proper SQLite DISTINCT operation handling by disallowing it where not supported and refactoring the dialect architecture for better provider-specific feature support. Key Changes1. Type System Updates (
|
No description provided.