Skip to content

[C#] Primary keys for query builder views#4614

Open
joshua-spacetime wants to merge 6 commits intojoshua/ts/transfer-pk-to-viewfrom
joshua/cs/transfer-pk-to-view
Open

[C#] Primary keys for query builder views#4614
joshua-spacetime wants to merge 6 commits intojoshua/ts/transfer-pk-to-viewfrom
joshua/cs/transfer-pk-to-view

Conversation

@joshua-spacetime
Copy link
Collaborator

@joshua-spacetime joshua-spacetime commented Mar 11, 2026

Description of Changes

Equivalent changes to #4573, but for C#.

The return type of a query builder view is now a special SATS product type { __query__: T }. A view with this return type now has a primary key if T has a primary key. This means that client codegen will generate an OnUpdate callback for such views. It will also generate query builder index bindings for the primary key column.

API and ABI breaking changes

None. Old modules with query builder views still work, they just don't have primary keys.

Expected complexity level and risk

2

Testing

Added equivalent tests to the ones that were added in #4573 and #4572.

Copy link
Contributor

@JasonAtClockwork JasonAtClockwork left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM though one small possible CI issue listed in the comment

@joshua-spacetime joshua-spacetime removed the request for review from cloutiertyler March 12, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants