clockworklabs / clockworklabs/SpacetimeDB
Feature request: UUIDs as primary key in table
Open
Nobody has claimed this yet.
feature-request
- Dominant language
- Rust
- Stars
- 25.2k
- Forks
- 1.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 46
Description
Right now you can't do this:
#[spacetimedb(table, name = "my_table")]
pub struct MyTable {
#[primary_key]
pub id: uuid,
pub name: String,
}
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
The issue only identifies a Rust table declaration using #[primary_key] with a uuid field; no files or tests are named. Start by tracing how the table macro validates primary-key types, then identify the related database representation and tests. Done means a UUID field is accepted as a primary key and the existing behavior remains covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100