SpacetimeDB icon indicating copy to clipboard operation
SpacetimeDB copied to clipboard

Add btree index filters to the C# sdk with codegen

Open lcodes opened this issue 1 year ago • 3 comments

Description of Changes

Adds support for multi-column btree index filtering in the C# client

  • codegen emitting Filter() overloads in the index handles
  • codegen emitting BTree storage and comparison operators
  • runtime changes to make Address and Identity comparable

API and ABI breaking changes

No breaks.

Expected complexity level and risk

Most complexity is in the codegen, the runtime behavior is straightforward; a SortedSet<> per btree with a comparator matching its key columns, and Filter() methods querying that sorted set with min/max values derived from the table row type.

Testing

lcodes avatar Oct 14 '24 17:10 lcodes

What's the testing for this change? It looks like the test suite is failing - do existing tests need updating, and/or does it have new tests for the new behavior?

bfops avatar Oct 15 '24 17:10 bfops

This needs rebase now that Identity/Address representations have changed + snapshot regen.

RReverser avatar Oct 21 '24 12:10 RReverser

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar May 03 '25 18:05 CLAassistant