Skip to content

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

Merged
joshua-spacetime merged 8 commits intomasterfrom
joshua/cs/transfer-pk-to-view-v2
Mar 13, 2026
Merged

[C#] Primary keys for query builder views#4626
joshua-spacetime merged 8 commits intomasterfrom
joshua/cs/transfer-pk-to-view-v2

Conversation

@joshua-spacetime
Copy link
Collaborator

Description of Changes

Same change set as #4614, just targeting master.

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.

@joshua-spacetime joshua-spacetime force-pushed the joshua/cs/transfer-pk-to-view-v2 branch from a33d86d to 48c4ee6 Compare March 12, 2026 23:37
Copy link
Contributor

@rekhoff rekhoff left a comment

Choose a reason for hiding this comment

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

These are the same changes as #4614 , just targeting master, so my approval in #4614 carries over to this one. The only difference is the removal of a separate view-pk-client regression test, which has now been folded into the existing client regression test. This change has also been reviewed and looks good to me.

@joshua-spacetime joshua-spacetime added this pull request to the merge queue Mar 13, 2026
Merged via the queue into master with commit a39b81b Mar 13, 2026
34 of 35 checks passed
@joshua-spacetime joshua-spacetime deleted the joshua/cs/transfer-pk-to-view-v2 branch March 13, 2026 06:26
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