You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[**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)
-[Adding Custom Parameters and Clauses](#adding-custom-parameters-and-clauses)
219
+
-[Additional References](#additional-references)
220
+
-[Contributions and Feedback](#contributions-and-feedback)
209
221
210
222
## Conventions, Motivations, and Migrations from v0.1
211
223
@@ -520,8 +532,8 @@ The second argument is an `options` object that specifies the details of your qu
520
532
| 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) |
521
533
| startKey |`object`| An object that contains the `partitionKey` and `sortKey` of the first item that this operation will evaluate. (ExclusiveStartKey) |
522
534
| 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*) |
525
537
526
538
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.
527
539
@@ -563,8 +575,8 @@ The `scan()` method accepts two arguments. The first argument is an `options` ob
563
575
| segments |`number`| For a parallel `scan` request, `segments` represents the total number of segments into which the `scan` operation will be divided. (TotalSegments) |
564
576
| segment |`number`| For a parallel `scan` request, `segment` identifies an individual segment to be scanned by an application worker. (Segment) |
565
577
| 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*) |
568
580
569
581
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.
570
582
@@ -597,8 +609,8 @@ The optional second argument accepts an `options` object. The following options
597
609
| consistent |`boolean` or `object` (see below) | Enable a consistent read of the items (ConsistentRead) |
598
610
| capacity |`string`| Return the amount of consumed capacity. One of either `none`, `total`, or `indexes` (ReturnConsumedCapacity) |
599
611
| 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*) |
602
614
603
615
#### Specifying options for multiple tables
604
616
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
650
662
| -------- | :--: | ----------- |
651
663
| capacity |`string` or `object` (see below) | Return the amount of consumed capacity. One of either `none`, `total`, or `indexes` (ReturnConsumedCapacity) |
652
664
| 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*) |
655
667
656
668
```javascript
657
669
constresult=awaitDefault.batchWrite(
@@ -746,8 +758,8 @@ The optional second argument accepts an `options` object. The following options
746
758
| consistent |`boolean`| Enable a consistent read of the items (ConsistentRead) |
747
759
| capacity |`string`| Return the amount of consumed capacity. One of either `none`, `total`, or `indexes` (ReturnConsumedCapacity) |
748
760
| 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*) |
751
763
752
764
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.
753
765
@@ -782,8 +794,8 @@ The optional second argument accepts an `options` object. The following options
782
794
| capacity |`string`| Return the amount of consumed capacity. One of either `none`, `total`, or `indexes` (ReturnConsumedCapacity) |
783
795
| 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) |
784
796
| 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*) |
787
799
788
800
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.
789
801
@@ -819,8 +831,8 @@ The optional second argument accepts an `options` object. The following options
819
831
| capacity |`string`| Return the amount of consumed capacity. One of either `none`, `total`, or `indexes` (ReturnConsumedCapacity) |
820
832
| 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) |
821
833
| 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*) |
824
836
825
837
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.
826
838
@@ -855,8 +867,8 @@ The optional second argument accepts an `options` object. The following options
855
867
| capacity |`string`| Return the amount of consumed capacity. One of either `none`, `total`, or `indexes` (ReturnConsumedCapacity) |
856
868
| 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) |
857
869
| 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*) |
860
872
861
873
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.
0 commit comments