Skip to content

Commit 4cebc95

Browse files
authored
Merge pull request dynamodb-toolbox#55 from omichowdhury/readme-et
Fix typo and add info on indexing entityField
2 parents 96b36d6 + 105cbe7 commit 4cebc95

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ const MyTable = new Table({
262262
| alias | `string` | no | An optional alias to reference your table when using "batch" features |
263263
| partitionKey | `string` | yes | The attribute name of your table's partitionKey |
264264
| sortKey | `string` | no | The attribute name of your table's sortKey |
265-
| entityField | `boolean` or `string` | no | Disables or overrides entity tracking field name (default: `_tp`) |
265+
| entityField | `boolean` or `string` | no | Disables or overrides entity tracking field name (default: `_et`) |
266266
| attributes | `object` | no | Complex type that optionally specifies the name and type of each attributes (see below) |
267267
| indexes | `object` | no | Complex type that optionally specifies the name keys of your secondary indexes (see below) |
268268
| autoExecute | `boolean` | no | Enables automatic execution of the DocumentClient method (default: `true`) |
@@ -302,7 +302,7 @@ indexes: {
302302
}
303303
```
304304

305-
**NOTE:** The **index name** must match the index name on your table as it will be used in queries and other operations.
305+
**NOTE:** The **index name** must match the index name on your table as it will be used in queries and other operations. The index must include the table's `entityField` attribute for automatic parsing of returned data.
306306

307307
## Entities
308308

@@ -515,7 +515,7 @@ The second argument is an `options` object that specifies the details of your qu
515515

516516
| Option | Type | Description |
517517
| -------- | :--: | ----------- |
518-
| index | `string` | Name of secondary index to query. If not specified, the query executes on the primary index. (IndexName) |
518+
| index | `string` | Name of secondary index to query. If not specified, the query executes on the primary index. The index must include the table's `entityField` attribute for automatic parsing of returned data. (IndexName) |
519519
| limit | `number` | The maximum number of items to retrieve per query. (Limit) |
520520
| reverse | `boolean` | Reverse the order or returned items. (ScanIndexForward) |
521521
| consistent | `boolean` | Enable a consistent read of the items (ConsistentRead) |
@@ -564,7 +564,7 @@ The `scan()` method accepts two arguments. The first argument is an `options` ob
564564

565565
| Option | Type | Description |
566566
| -------- | :--: | ----------- |
567-
| index | `string` | Name of secondary index to scan. If not specified, the query executes on the primary index. (IndexName) |
567+
| index | `string` | Name of secondary index to scan. If not specified, the query executes on the primary index. The index must include the table's `entityField` attribute for automatic parsing of returned data. (IndexName) |
568568
| limit | `number` | The maximum number of items to retrieve per scan. (Limit) |
569569
| consistent | `boolean` | Enable a consistent read of the items (ConsistentRead) |
570570
| capacity | `string` | Return the amount of consumed capacity. One of either `none`, `total`, or `indexes` (ReturnConsumedCapacity) |

0 commit comments

Comments
 (0)