Skip to content

Feature request: Custom types for indexes in modules #2606

@jdetter

Description

@jdetter

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions