Files
SpacetimeDB/modules/sdk-test-view-pk-cs
joshua-spacetime a39b81b087 [C#] Primary keys for query builder views (#4626)
# Description of Changes

Same change set as
https://github.com/clockworklabs/SpacetimeDB/pull/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.
2026-03-13 00:57:50 +00:00
..

sdk-test-view-pk-cs C# test

See the sdk-test-view-pk README for more details.

Warning

: This C# source code is manually derived from ../sdk-test-view-pk/src/lib.rs and is supposed to be functionally equivalent. Do not add new types or functionality here that are not present in the Rust version, because they're compared against each other.