Repository navigation
feat: add Query.relationship helper - #1903
Conversation
Expose relationship queries on generated Query classes so SDKs can constrain populated related documents the same way as Query::relationship in utopia-php/database.
|
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
🟢 Tier S · Ready to mergeAdds 6 of 16 changed files were too large to include in full. Latest changes: The newest commits add fluent query builders and broader query-helper support across the language templates, including client-side normalization or flattening for builder inputs and additional tests and examples.
Note Part of the diff was too large to review, so Hansi did not approve. 📂 Walkthrough · 19
Reviewed the commits since |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged
Verified locally:
Not checked locally (CI covers them): Black for Python and RuboCop for Ruby, because neither is installed here. |
Summary
Adds
Query.relationshipto generated SDKs so clients can constrain populated related documents.This matches
Query::relationship()/TYPE_RELATIONSHIPin utopia-php/database#968.The helper takes a relationship attribute and inner queries (filters, order, select, pagination), then serializes them as nested query objects — the same shape as
Query.elemMatch.Languages
PHP, Web/Node, Deno, React Native, Dart/Flutter, Python, Ruby, Kotlin/Android, .NET/Unity, Swift/Apple, Go, Rust.
Skills docs include the new helper.
Test plan
Query::relationshipunit test (8 assertions)gofmtelemMatchMerge order
main. Every conflict is an append-at-EOF collision; the resolution is to keep both hunks. This branch will be re-merged withmainafter feat: add Query.Builder, aggregates, joins, and nested ON #1817 lands.