-
-
Notifications
You must be signed in to change notification settings - Fork 17
Implement CaseExpressionBuilder class
#415
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #415 +/- ##
=========================================
Coverage 99.88% 99.89%
- Complexity 286 296 +10
=========================================
Files 32 33 +1
Lines 906 930 +24
=========================================
+ Hits 905 929 +24
Misses 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 implements PostgreSQL support for CaseExpression by introducing a dedicated builder, registering it, and adding tests.
- Registers
CaseExpressionBuilderinDQLQueryBuilder - Implements
CaseExpressionBuilderwith type hinting and WHEN/ELSE clause handling - Adds unit tests for various
CaseExpressionscenarios and updates test trait
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/Support/TestTrait.php | Made getDriverName() static to support data providers in tests |
| tests/CaseExpressionBuilderTest.php | Added tests covering CaseExpressionBuilder behavior |
| src/DQLQueryBuilder.php | Registered CaseExpressionBuilder in the default builders map |
| src/Builder/CaseExpressionBuilder.php | Implemented Postgres-specific CaseExpressionBuilder |
Comments suppressed due to low confidence (2)
tests/CaseExpressionBuilderTest.php:53
- Consider adding a test case for a
CaseExpressionwithout anyWHENclauses to ensure the builder throws the expectedInvalidArgumentException.
]
tests/Support/TestTrait.php:63
- [nitpick] Since
getDriverName()is now static, consider updating its docblock (or method use) to reflect its static nature and ensure consistency across other test traits.
protected static function getDriverName(): string
Related PR
CaseExpressiondb#988