Skip to content

Commit 5d904a5

Browse files
committed
fix dynamodb-toolbox#67 - documentation update
1 parent eb96327 commit 5d904a5

File tree

1 file changed

+85
-73
lines changed

1 file changed

+85
-73
lines changed

README.md

Lines changed: 85 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -149,63 +149,75 @@ If you like working with ORMs, that's great, and you should definitely give thes
149149

150150
## Table of Contents
151151

152-
- [Installation and Basic Usage](#installation-and-basic-usage)
153-
- [Conventions and Motivations](#conventions-and-motivations)
154-
- [Tables](#tables)
155-
- [Table Attributes](#table-attributes)
156-
- [Table Indexes](#table-indexes)
157-
- [Entities](#entities)
158-
- [Specifying Entity Definitions](#specifying-entity-definitions)
159-
- [Entity Attributes](#entity-attributes)
160-
- [Using a `string`](#using-a-string)
161-
- [Using an `object`](#using-an-object)
162-
- [Using an `array` for composite keys](#using-an-array-for-composite-keys)
163-
- [Customize defaults with a `function`](#customize-defaults-with-a-function)
164-
- [Table Properties](#table-properties)
165-
- [get/set `DocumentClient`](#getset-documentclient)
166-
- [get/set `entities`](#getset-entities)
167-
- [get/set `autoExecute`](#getset-autoexecute)
168-
- [get/set `autoParse`](#getset-autoparse)
169-
- [Table Methods](#table-methods)
170-
- [query()](#querypartitionkey-options-parameters)
171-
- [scan()](#scanoptions-parameters)
172-
- [batchGet()](#batchgetitems-options-parameters)
173-
- [batchWrite()](#batchwriteitems-options-parameters)
174-
- [parse()](#parseentity-input-include)
175-
- [get()](#getentity-key-options-parameters)
176-
- [delete()](#deleteentity-key-options-parameters)
177-
- [put()](#putentity-item-options-parameters)
178-
- [update()](#updateentity-key-options-parameters)
179-
- [Entity Properties](#entity-properties)
180-
- [get/set `table`](#getset-table)
181-
- [get `DocumentClient`](#get-documentclient)
182-
- [get/set `autoExecute`](#getset-autoexecute-1)
183-
- [get/set `autoParse`](#getset-autoparse-1)
184-
- [get `partitionKey`](#get-partitionkey)
185-
- [get `sortKey`](#get-sortkey)
186-
- [Entity Methods](#entity-methods)
187-
- [attribute()](#attributeattribute)
188-
- [parse()](#parseinput-include)
189-
- [get()](#getkey-options-parameters)
190-
- [delete()](#deletekey-options-parameters)
191-
- [put()](#putitem-options-parameters)
192-
- [update()](#updatekey-options-parameters)
193-
- [Removing an attribute](#removing-an-attribute)
194-
- [Adding a number to a `number` attribute](#adding-a-number-to-a-number-attribute)
195-
- [Adding values to a `set`](#adding-values-to-a-set)
196-
- [Deleting values from a `set`](#deleting-values-from-a-set)
197-
- [Appending (or prepending) values to a `list`](#appending-or-prepending-values-to-a-list)
198-
- [Remove items from a `list`](#remove-items-from-a-list)
199-
- [Update items in a `list`](#update-items-in-a-list)
200-
- [Update nested data in a `map`](#update-nested-data-in-a-map)
201-
- [query()](#querypartitionkey-options-parameters-1)
202-
- [scan()](#scanoptions-parameters-1)
203-
- [Filters and Conditions](#filters-and-conditions)
204-
- [Complex Filters and Conditions](#complex-filters-and-conditions)
205-
- [Projection Expressions](#projection-expressions)
206-
- [Adding Custom Parameters and Clauses](#adding-custom-parameters-and-clauses)
207-
- [Additional References](#additional-references)
208-
- [Contributions and Feedback](#contributions-and-feedback)
152+
- [DynamoDB Toolbox - v0.2](#dynamodb-toolbox---v02)
153+
- [**NOTE:** This project is in BETA. Please submit issues/feedback or feel free to contact me on Twitter [@jeremy_daly](https://twitter.com/jeremy_daly).](#note-this-project-is-in-beta-please-submit-issuesfeedback-or-feel-free-to-contact-me-on-twitter-jeremy_daly)
154+
- [Single Table Designs have never been this easy!](#single-table-designs-have-never-been-this-easy)
155+
- [Installation and Basic Usage](#installation-and-basic-usage)
156+
- [This is *NOT* an ORM (at least it's not trying to be)](#this-is-not-an-orm-at-least-its-not-trying-to-be)
157+
- [Features](#features)
158+
- [Table of Contents](#table-of-contents)
159+
- [Conventions, Motivations, and Migrations from v0.1](#conventions-motivations-and-migrations-from-v01)
160+
- [Tables](#tables)
161+
- [Specifying Table Definitions](#specifying-table-definitions)
162+
- [Table Attributes](#table-attributes)
163+
- [Table Indexes](#table-indexes)
164+
- [Entities](#entities)
165+
- [Specifying Entity Definitions](#specifying-entity-definitions)
166+
- [Entity Attributes](#entity-attributes)
167+
- [Using a `string`](#using-a-string)
168+
- [Using an `object`](#using-an-object)
169+
- [Using an `array` for composite keys](#using-an-array-for-composite-keys)
170+
- [Customize defaults with a `function`](#customize-defaults-with-a-function)
171+
- [Table Properties](#table-properties)
172+
- [get/set `DocumentClient`](#getset-documentclient)
173+
- [get/set `entities`](#getset-entities)
174+
- [get/set `autoExecute`](#getset-autoexecute)
175+
- [get/set `autoParse`](#getset-autoparse)
176+
- [Table Methods](#table-methods)
177+
- [query(partitionKey [,options] [,parameters])](#querypartitionkey-options-parameters)
178+
- [Return Data](#return-data)
179+
- [scan([options] [,parameters])](#scanoptions-parameters)
180+
- [Return Data](#return-data-1)
181+
- [batchGet(items [,options] [,parameters])](#batchgetitems-options-parameters)
182+
- [Specifying options for multiple tables](#specifying-options-for-multiple-tables)
183+
- [Return Data](#return-data-2)
184+
- [batchWrite(items [,options] [,parameters])](#batchwriteitems-options-parameters)
185+
- [Return Data](#return-data-3)
186+
- [parse(entity, input [,include])](#parseentity-input-include)
187+
- [get(entity, key [,options] [,parameters])](#getentity-key-options-parameters)
188+
- [delete(entity, key [,options] [,parameters])](#deleteentity-key-options-parameters)
189+
- [put(entity, item [,options] [,parameters])](#putentity-item-options-parameters)
190+
- [update(entity, key [,options] [,parameters])](#updateentity-key-options-parameters)
191+
- [Entity Properties](#entity-properties)
192+
- [get/set `table`](#getset-table)
193+
- [get `DocumentClient`](#get-documentclient)
194+
- [get/set `autoExecute`](#getset-autoexecute-1)
195+
- [get/set `autoParse`](#getset-autoparse-1)
196+
- [get `partitionKey`](#get-partitionkey)
197+
- [get `sortKey`](#get-sortkey)
198+
- [Entity Methods](#entity-methods)
199+
- [attribute(attribute)](#attributeattribute)
200+
- [parse(input [,include])](#parseinput-include)
201+
- [get(key [,options] [,parameters])](#getkey-options-parameters)
202+
- [delete(key [,options] [,parameters])](#deletekey-options-parameters)
203+
- [put(item [,options] [,parameters])](#putitem-options-parameters)
204+
- [update(key [,options] [,parameters])](#updatekey-options-parameters)
205+
- [Removing an attribute](#removing-an-attribute)
206+
- [Adding a number to a `number` attribute](#adding-a-number-to-a-number-attribute)
207+
- [Adding values to a `set`](#adding-values-to-a-set)
208+
- [Deleting values from a `set`](#deleting-values-from-a-set)
209+
- [Appending (or prepending) values to a `list`](#appending-or-prepending-values-to-a-list)
210+
- [Remove items from a `list`](#remove-items-from-a-list)
211+
- [Update items in a `list`](#update-items-in-a-list)
212+
- [Update nested data in a `map`](#update-nested-data-in-a-map)
213+
- [query(partitionKey [,options] [,parameters])](#querypartitionkey-options-parameters-1)
214+
- [scan([options] [,parameters])](#scanoptions-parameters-1)
215+
- [Filters and Conditions](#filters-and-conditions)
216+
- [Complex Filters and Conditions](#complex-filters-and-conditions)
217+
- [Projection Expressions](#projection-expressions)
218+
- [Adding Custom Parameters and Clauses](#adding-custom-parameters-and-clauses)
219+
- [Additional References](#additional-references)
220+
- [Contributions and Feedback](#contributions-and-feedback)
209221

210222
## Conventions, Motivations, and Migrations from v0.1
211223

@@ -520,8 +532,8 @@ The second argument is an `options` object that specifies the details of your qu
520532
| attributes | `array` or `object` | An `array` or array of complex `objects` that specify which attributes should be returned. See [Projection Expression](#projection-expression) below (ProjectionExpression) |
521533
| startKey | `object` | An object that contains the `partitionKey` and `sortKey` of the first item that this operation will evaluate. (ExclusiveStartKey) |
522534
| entity | `string` | The name of a table Entity to evaluate `filters` and `attributes` against. |
523-
| autoExecute | `boolean` | Enables/disables automatic execution of the DocumentClient method (default: *inherited from Entity*) |
524-
| autoParse | `boolean` | Enables/disables automatic parsing of returned data when `autoExecute` evaluates to `true` (default: *inherited from Entity*) |
535+
| execute | `boolean` | Enables/disables automatic execution of the DocumentClient method (default: *inherited from Entity*) |
536+
| parse | `boolean` | Enables/disables automatic parsing of returned data when `autoExecute` evaluates to `true` (default: *inherited from Entity*) |
525537

526538
If you prefer to specify your own parameters, the optional third argument allows you to add custom parameters. [See Adding custom parameters and clauses](#adding-custom-parameters-and-clauses) for more information.
527539

@@ -563,8 +575,8 @@ The `scan()` method accepts two arguments. The first argument is an `options` ob
563575
| segments | `number` | For a parallel `scan` request, `segments` represents the total number of segments into which the `scan` operation will be divided. (TotalSegments) |
564576
| segment | `number` | For a parallel `scan` request, `segment` identifies an individual segment to be scanned by an application worker. (Segment) |
565577
| entity | `string` | The name of a table Entity to evaluate `filters` and `attributes` against. |
566-
| autoExecute | `boolean` | Enables/disables automatic execution of the DocumentClient method (default: *inherited from Entity*) |
567-
| autoParse | `boolean` | Enables/disables automatic parsing of returned data when `autoExecute` evaluates to `true` (default: *inherited from Entity*) |
578+
| execute | `boolean` | Enables/disables automatic execution of the DocumentClient method (default: *inherited from Entity*) |
579+
| parse | `boolean` | Enables/disables automatic parsing of returned data when `autoExecute` evaluates to `true` (default: *inherited from Entity*) |
568580

569581
If you prefer to specify your own parameters, the optional second argument allows you to add custom parameters. [See Adding custom parameters and clauses](#adding-custom-parameters-and-clauses) for more information.
570582

@@ -597,8 +609,8 @@ The optional second argument accepts an `options` object. The following options
597609
| consistent | `boolean` or `object` (see below) | Enable a consistent read of the items (ConsistentRead) |
598610
| capacity | `string` | Return the amount of consumed capacity. One of either `none`, `total`, or `indexes` (ReturnConsumedCapacity) |
599611
| attributes | `array` or `object` (see below) | An `array` or array of complex `objects` that specify which attributes should be returned. See [Projection Expression](#projection-expression) below (ProjectionExpression) |
600-
| autoExecute | `boolean` | Enables/disables automatic execution of the DocumentClient method (default: *inherited from Entity*) |
601-
| autoParse | `boolean` | Enables/disables automatic parsing of returned data when `autoExecute` evaluates to `true` (default: *inherited from Entity*) |
612+
| execute | `boolean` | Enables/disables automatic execution of the DocumentClient method (default: *inherited from Entity*) |
613+
| parse | `boolean` | Enables/disables automatic parsing of returned data when `autoExecute` evaluates to `true` (default: *inherited from Entity*) |
602614

603615
#### Specifying options for multiple tables
604616
The library is built for making working with single table designs easier, but it is possible that you may need to retrieve data from multiple tables within the same batch get. If your `items` contain references to multiple tables, the `consistent` option will accept objects that use either the table `name` or `alias` as the key, and the setting as the value. For example, to specify different `consistent` settings on two tables, you would use something like following:
@@ -650,8 +662,8 @@ The optional second argument accepts an `options` object. The following options
650662
| -------- | :--: | ----------- |
651663
| capacity | `string` or `object` (see below) | Return the amount of consumed capacity. One of either `none`, `total`, or `indexes` (ReturnConsumedCapacity) |
652664
| metrics | `string` | Return item collection metrics. If set to `size`, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. One of either `none` or `size` (ReturnItemCollectionMetrics) |
653-
| autoExecute | `boolean` | Enables/disables automatic execution of the DocumentClient method (default: *inherited from Entity*) |
654-
| autoParse | `boolean` | Enables/disables automatic parsing of returned data when `autoExecute` evaluates to `true` (default: *inherited from Entity*) |
665+
| execute | `boolean` | Enables/disables automatic execution of the DocumentClient method (default: *inherited from Entity*) |
666+
| parse | `boolean` | Enables/disables automatic parsing of returned data when `autoExecute` evaluates to `true` (default: *inherited from Entity*) |
655667

656668
```javascript
657669
const result = await Default.batchWrite(
@@ -746,8 +758,8 @@ The optional second argument accepts an `options` object. The following options
746758
| consistent | `boolean` | Enable a consistent read of the items (ConsistentRead) |
747759
| capacity | `string` | Return the amount of consumed capacity. One of either `none`, `total`, or `indexes` (ReturnConsumedCapacity) |
748760
| attributes | `array` or `object` | An `array` or array of complex `objects` that specify which attributes should be returned. See [Projection Expression](#projection-expression) below (ProjectionExpression) |
749-
| autoExecute | `boolean` | Enables/disables automatic execution of the DocumentClient method (default: *inherited from Entity*) |
750-
| autoParse | `boolean` | Enables/disables automatic parsing of returned data when `autoExecute` evaluates to `true` (default: *inherited from Entity*) |
761+
| execute | `boolean` | Enables/disables automatic execution of the DocumentClient method (default: *inherited from Entity*) |
762+
| parse | `boolean` | Enables/disables automatic parsing of returned data when `autoExecute` evaluates to `true` (default: *inherited from Entity*) |
751763

752764
If you prefer to specify your own parameters, the optional third argument allows you to add custom parameters. [See Adding custom parameters and clauses](#adding-custom-parameters-and-clauses) for more information.
753765

@@ -782,8 +794,8 @@ The optional second argument accepts an `options` object. The following options
782794
| capacity | `string` | Return the amount of consumed capacity. One of either `none`, `total`, or `indexes` (ReturnConsumedCapacity) |
783795
| metrics | `string` | Return item collection metrics. If set to `size`, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. One of either `none` or `size` (ReturnItemCollectionMetrics) |
784796
| returnValues | `string` | Determins whether to return item attributes as they appeared before they were deleted. One of either `none` or `all_old`. (ReturnValues) |
785-
| autoExecute | `boolean` | Enables/disables automatic execution of the DocumentClient method (default: *inherited from Entity*) |
786-
| autoParse | `boolean` | Enables/disables automatic parsing of returned data when `autoExecute` evaluates to `true` (default: *inherited from Entity*) |
797+
| execute | `boolean` | Enables/disables automatic execution of the DocumentClient method (default: *inherited from Entity*) |
798+
| parse | `boolean` | Enables/disables automatic parsing of returned data when `autoExecute` evaluates to `true` (default: *inherited from Entity*) |
787799

788800
If you prefer to specify your own parameters, the optional third argument allows you to add custom parameters. [See Adding custom parameters and clauses](#adding-custom-parameters-and-clauses) for more information.
789801

@@ -819,8 +831,8 @@ The optional second argument accepts an `options` object. The following options
819831
| capacity | `string` | Return the amount of consumed capacity. One of either `none`, `total`, or `indexes` (ReturnConsumedCapacity) |
820832
| metrics | `string` | Return item collection metrics. If set to `size`, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. One of either `none` or `size` (ReturnItemCollectionMetrics) |
821833
| returnValues | `string` | Determins whether to return item attributes as they appeared before a new item was added. One of either `none` or `all_old`. (ReturnValues) |
822-
| autoExecute | `boolean` | Enables/disables automatic execution of the DocumentClient method (default: *inherited from Entity*) |
823-
| autoParse | `boolean` | Enables/disables automatic parsing of returned data when `autoExecute` evaluates to `true` (default: *inherited from Entity*) |
834+
| execute | `boolean` | Enables/disables automatic execution of the DocumentClient method (default: *inherited from Entity*) |
835+
| parse | `boolean` | Enables/disables automatic parsing of returned data when `autoExecute` evaluates to `true` (default: *inherited from Entity*) |
824836

825837
If you prefer to specify your own parameters, the optional third argument allows you to add custom parameters. [See Adding custom parameters and clauses](#adding-custom-parameters-and-clauses) for more information.
826838

@@ -855,8 +867,8 @@ The optional second argument accepts an `options` object. The following options
855867
| capacity | `string` | Return the amount of consumed capacity. One of either `none`, `total`, or `indexes` (ReturnConsumedCapacity) |
856868
| metrics | `string` | Return item collection metrics. If set to `size`, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. One of either `none` or `size` (ReturnItemCollectionMetrics) |
857869
| returnValues | `string` | Determins whether to return item attributes as they appeared before or after the item was updated. One of either `none`, `all_old`, `updated_old`, `all_new`, `updated_new`. (ReturnValues) |
858-
| autoExecute | `boolean` | Enables/disables automatic execution of the DocumentClient method (default: *inherited from Entity*) |
859-
| autoParse | `boolean` | Enables/disables automatic parsing of returned data when `autoExecute` evaluates to `true` (default: *inherited from Entity*) |
870+
| execute | `boolean` | Enables/disables automatic execution of the DocumentClient method (default: *inherited from Entity*) |
871+
| parse | `boolean` | Enables/disables automatic parsing of returned data when `autoExecute` evaluates to `true` (default: *inherited from Entity*) |
860872

861873
If you prefer to specify your own parameters, the optional third argument allows you to add custom parameters and clauses. [See Adding custom parameters and clauses](#adding-custom-parameters-and-clauses) for more information.
862874

0 commit comments

Comments
 (0)