docs: parameterized computed fields#630
Conversation
Add a "Parameterized Computed Fields" section to the ORM computed-fields page: the ZModel parameter syntax, the 3-argument implementation signature, how to supply `args` across orderBy / where / select / include / aggregate / groupBy, and a note on grouping by a correlated-subquery computed field. Documents zenstackhq/zenstack#2744 and zenstackhq/zenstack#2762. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Someone is attempting to deploy a commit to the ZenStack Team on Vercel. A member of the Team first needs to authorize it. |
|
Warning Review limit reached
Next review available in: 55 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughAdds documentation for declaring, implementing, and querying parameterized computed fields, including explicit argument passing and selection requirements. ChangesParameterized Computed Fields
Estimated code review effort: 1 (Trivial) | ~3 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.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@docs/orm/computed-fields.md`:
- Around line 83-85: Update the “Parameterized Computed Fields” section in
computed-fields.md by importing AvailableSince from the relative
_components/AvailableSince path and placing an <AvailableSince version="v3.9.0"
/> component immediately below that heading.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: e47bf9d5-1228-49e0-aea8-01f162909d0c
📒 Files selected for processing (1)
docs/orm/computed-fields.md
New-feature docs must carry an <AvailableSince> release marker (review feedback). Imported from `../_components/AvailableSince` to match this file's other component imports (the suggested `./_components` path is incorrect — the component lives at docs/_components/). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
What
Documents the parameterized
@computedfields feature on the ORM Computed Fields page.Adds a Parameterized Computed Fields section covering:
recentPostCount(since: DateTime) Int @computedargsargument, typed from the declared parameters)argsacross every read context:orderBy,where(andhaving),select/include,aggregate(_count/_sum/_avg/_min/_max), andgroupBybyselect/include)GROUP BYrulesRelated
orderBysupport: feat: support parameterized computed fields zenstack#2744where/select/include/aggregate/groupBy: feat: parameterized computed fields in where / select / include / aggregate / groupBy zenstack#2762🤖 Generated with Claude Code
Summary by CodeRabbit