SpacetimeDB icon indicating copy to clipboard operation
SpacetimeDB copied to clipboard

Feature request: Custom types for indexes in modules

Open jdetter opened this issue 8 months ago • 0 comments

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:

Image

jdetter avatar Apr 14 '25 16:04 jdetter