Commit 38a8b43
fix(module): use accessor = links syntax for spacetimedb #[table] macro
The spacetimedb v2 #[table] attribute uses `accessor = name` not `name = name`.
The `accessor` parameter specifies both:
- the SQL table name (used in subscriptions: SELECT * FROM links)
- the Rust method name (used in reducers: ctx.db.links())
Also fix delete/find calls to pass references (&id) not values (id)
as required by the SpacetimeDB API for primary key lookup methods.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent bbe83de commit 38a8b43
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
0 commit comments