#2606Requested

Feature request: Custom types for indexes in modules

Requested on GitHub by jdetter
Energy Committed0TeV

Created from discord issue: https://discord.com/channels/1037340874172014652/1353158092547817483/1353158092547817483

If you have a table in a C# module defined like this:

   [Table(Public = true)]
   [SpacetimeDB.Index.BTree(Name = "GetPos", Columns = [nameof(CharacterID), nameof(Pos)])]
   public partial class Test
   {
       [PrimaryKey, AutoInc]
       public uint RowID;
       public Vector2 Pos;
       public uint CharacterID;
   }

Vector2 is a struct defined within partial class Module. If you do this, this yields:

  1. jdetter added the bug label Apr 14, 2025
  2. jdetter renamed to "Feature request: Custom types for indexes in modules" Apr 14, 2025
  3. Centril added the feature-request label Apr 15, 2025
  4. Centril removed the bug label Apr 15, 2025

Boost this Request

Reopen this request?

The request will return to its prior live status.

Mark as Duplicate

Pick the request that Feature request: Custom types for indexes in modules is a duplicate of. Energy rolls up into that request and GitHub closes the linked issue as a duplicate with a timeline reference to the canonical.

Unmark Duplicate

Restore as an independent request. The linked GitHub issue will be reopened and its duplicate-of relationship cleared. The original timeline entries stay as history; the note below is posted as a follow-up comment.