fix(orm): allow setting null on optional Decimal fields when using sqlite provider - #2798
fix(orm): allow setting null on optional Decimal fields when using sqlite provider#2798sanny-io wants to merge 4 commits into
null on optional Decimal fields when using sqlite provider#2798Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe SQLite dialect now preserves ChangesSQLite Decimal null handling
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/e2e/orm/client-api/sqlite-null.test.ts (1)
7-25: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd update coverage for nullable
Decimalvalues.Line 17 only verifies the create path. Add an update operation that assigns
balance: nulland assert that the result containsbalance: null. This prevents a regression in update handling from passing the test.The PR objective includes both create and update operations.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/e2e/orm/client-api/sqlite-null.test.ts` around lines 7 - 25, Extend the “allows writing null to optional Decimal fields” test after the existing create assertion to update the created User with balance: null, then assert the update result contains balance: null. Reuse the created record’s identifier and existing db.user API so both create and update paths are covered.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tests/e2e/orm/client-api/sqlite-null.test.ts`:
- Around line 7-25: Extend the “allows writing null to optional Decimal fields”
test after the existing create assertion to update the created User with
balance: null, then assert the update result contains balance: null. Reuse the
created record’s identifier and existing db.user API so both create and update
paths are covered.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 06fef48d-4f0c-47cd-8b02-f30a561e6e41
📒 Files selected for processing (2)
packages/orm/src/client/crud/dialects/sqlite.tstests/e2e/orm/client-api/sqlite-null.test.ts
null on optional Decimal fields when using sqlite providernull on optional Decimal fields when using sqlite provider
Fixes #2797
Summary by CodeRabbit
Bug Fixes
nullvalues when creating and retrieving records.Tests