clockworklabs / clockworklabs/SpacetimeDB
Feature request: Custom types for indexes in modules
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 25.2k
- Forks
- 1.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 46
Description
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:
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation files or tests are named. Reproduce the C# table example with a Vector2 struct defined inside the partial Module, then determine the expected behavior for using that custom type in the BTree index and document a passing example or test as done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100