add direct get and all calls#6
Conversation
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR adds two convenience methods ( ChangesConvenience methods for retrieving all models
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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.
Pull request overview
Adds direct model-level retrieval helpers so callers can fetch all records with Model.get() or Model.all() instead of explicitly starting from Model.query().
Changes:
- Added
StaticForwarder.get()andStaticForwarder.all()as direct forwarding methods toquery().get(). - Added tests covering direct retrieval, return typing, and continued builder chaining with
get(). - Updated retrieving-models documentation to mention direct class-level
all/getusage.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/model/StaticForwarder.ts |
Adds static get() and all() forwarding methods. |
test/tests/Base.ts |
Adds coverage for direct model retrieval and type expectations. |
docs/content/2.models/2.retrieving.md |
Updates docs to show direct retrieval via User.all(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add direct get() and all() function calls to models
Summary by CodeRabbit
Release Notes
New Features
Model.all()orModel.get()for cleaner syntax when fetching all records.Documentation