Skip to content

Commit cacfd73

Browse files
docs: fix TS index definition nameaccessor (#4537)
The TypeScript table index definition uses `accessor` not `name` for the index identifier. Fixes three instances: - `docs/docs/.../indexes.md`: two occurrences (`idx_age`, `by_player_and_level`) - `docs/docs/.../constraints.md`: one occurrence (`by_user_item`) ```diff -{ name: 'by_player_and_level', algorithm: 'btree', columns: ['player_id', 'level'] } +{ accessor: 'by_player_and_level', algorithm: 'btree', columns: ['player_id', 'level'] } ``` Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
1 parent e8d829d commit cacfd73

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

docs/docs/00200-core-concepts/00300-tables/00240-constraints.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ const inventory = table(
105105
name: 'inventory',
106106
public: true,
107107
indexes: [
108-
{ name: 'by_user_item', algorithm: 'btree', columns: ['userId', 'itemId'] },
108+
{ accessor: 'by_user_item', algorithm: 'btree', columns: ['userId', 'itemId'] },
109109
],
110110
},
111111
{

docs/docs/00200-core-concepts/00300-tables/00300-indexes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ const user = table(
187187
name: 'user',
188188
public: true,
189189
indexes: [
190-
{ name: 'idx_age', algorithm: 'btree', columns: ['age'] },
190+
{ accessor: 'idx_age', algorithm: 'btree', columns: ['age'] },
191191
],
192192
},
193193
{
@@ -256,7 +256,7 @@ const score = table(
256256
name: 'score',
257257
public: true,
258258
indexes: [
259-
{ name: 'by_player_and_level', algorithm: 'btree', columns: ['player_id', 'level'] },
259+
{ accessor: 'by_player_and_level', algorithm: 'btree', columns: ['player_id', 'level'] },
260260
],
261261
},
262262
{

0 commit comments

Comments
 (0)