Skip to content

Commit

Permalink
Update documentation for `[New Feature]: Allow TTL attribute to also …
Browse files Browse the repository at this point in the history
…be a partition or sort key`

See architect/inventory#71
  • Loading branch information
MartinRamm committed Dec 9, 2023
1 parent f2029b9 commit aadfaea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/views/docs/en/guides/backend/indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ In this example you can query for an account by their username or email!
- Otherwise, the basic syntax for defining `@indexes` is the same as `@tables`:
- Partition key, defined by a `*`, is required
- Sort key, defined by `**`, is optional
- Currently only `*String`, `**String`, `*Number` and `**Number` are supported
- Currently only `*String`, `**String`, `*Number`, `**Number`, `*TTL`, `**TTL` are supported
- `*TTL` and `**TTL` is equivalent to `*Number` and `**Number` respectively, but also turns [time-to-live](./tables.md#time-to-live) on.

## Examples

Expand Down
1 change: 1 addition & 0 deletions src/views/docs/en/guides/backend/tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ accounts
- The required partition key is denoted by `*`
- The optional sort key is denoted by `**`
- Currently only `*String`, `**String`, `*Number` and `**Number` are supported
- `*TTL` and `**TTL` is equivalent to `*Number` and `**Number` respectively, but also turns [time-to-live](#time-to-live) on.
- Lambdas can only be values of: `insert`, `update`, or `destroy`

> **Protip:** table names can be anything but choose a consistent naming scheme within your app namespace; one useful scheme is plural nouns like: `accounts` or `email-invites`
Expand Down

0 comments on commit aadfaea

Please sign in to comment.