Repository navigation
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Cardinality error and query helpers src/database/errors.ts, src/database/database.ts |
Adds ResultCardinalityError with the expected cardinality and actual row count. Adds helpers that return a single row, an optional row, or a non-empty row array according to their cardinality rules. |
Public exports and helper validation src/database.ts, src/database/database.test-d.ts, src/database/database.test.ts, docs/database.md, docs/reference.md, docs/troubleshooting.md, .changeset/cardinality-helpers.md |
Re-exports the helpers and error. Tests check result types, cardinality outcomes, and that runOne does not add a LIMIT. Documentation describes the helpers and their error behavior. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Feature
Possibly related PRs
- MapleTechLabs/effect-orm#8: Adds the
Database.runAPI that the cardinality helpers call. - MapleTechLabs/effect-orm#27: Changes the
Runnablecontract used by the new helpers. - MapleTechLabs/effect-orm#19: Changes the accepted insert types in
Database.Runnable, which the helpers use.
Suggested reviewers: makisuo
Merge Risk: 
Minimal · up to 0315f
-
The new helpers add row-count validation. No merge-blocking issue was identified.
Pre-merge checks: 
5
Finishing Touches: 💡 1
-
🧪 Generate unit tests (beta)
-
- Create a new PR
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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 @coderabbitai help to get the list of available commands.
f602dad to
0315f9e
Compare
Summary by CodeRabbit