From aadfaead4d7f1540230ae6425d8fb207f38c5581 Mon Sep 17 00:00:00 2001 From: Martin Ramm Date: Sat, 9 Dec 2023 01:10:45 +0100 Subject: [PATCH] Update documentation for `[New Feature]: Allow TTL attribute to also be a partition or sort key` See https://github.com/architect/inventory/pull/71 --- src/views/docs/en/guides/backend/indexes.md | 3 ++- src/views/docs/en/guides/backend/tables.md | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/docs/en/guides/backend/indexes.md b/src/views/docs/en/guides/backend/indexes.md index 465ec0f2..6b3336c3 100644 --- a/src/views/docs/en/guides/backend/indexes.md +++ b/src/views/docs/en/guides/backend/indexes.md @@ -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 diff --git a/src/views/docs/en/guides/backend/tables.md b/src/views/docs/en/guides/backend/tables.md index 92a6d699..aeb65dd5 100644 --- a/src/views/docs/en/guides/backend/tables.md +++ b/src/views/docs/en/guides/backend/tables.md @@ -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`