Skip to content

Commit a9e8766

Browse files
committed
fix dynamodb-toolbox#49 by renaming to UnprocessedItems
1 parent 9ee608f commit a9e8766

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ const result = await Default.batchWrite(
683683
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.
684684

685685
#### Return Data
686-
The data is returned with the same response syntax as the [DynamoDB BatchWriteItem API](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html). If `autoExecute` and `autoParse` are enabled, a `.next()` method will be available on the returned object. Calling this function will call the `batchWrite` method again using the same options and passing any `UnprocessedKeys` in as the `RequestItems`. This is a convenience method for retrying unprocessed keys.
686+
The data is returned with the same response syntax as the [DynamoDB BatchWriteItem API](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html). If `autoExecute` and `autoParse` are enabled, a `.next()` method will be available on the returned object. Calling this function will call the `batchWrite` method again using the same options and passing any `UnprocessedItems` in as the `RequestItems`. This is a convenience method for retrying unprocessed keys.
687687

688688
### parse(entity, input [,include])
689689

classes/Table.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -955,11 +955,11 @@ class Table {
955955
parseBatchWriteResponse(result,options={}) {
956956
return Object.assign(
957957
result,
958-
// If UnprocessedKeys, return a next function
959-
result.UnprocessedKeys && Object.keys(result.UnprocessedKeys).length > 0 ? {
958+
// If UnprocessedItems, return a next function
959+
result.UnprocessedItems && Object.keys(result.UnprocessedItems).length > 0 ? {
960960
next: () => {
961961
const nextResult = this.DocumentClient.batchWrite(Object.assign(
962-
{ RequestItems: result.UnprocessedKeys },
962+
{ RequestItems: result.UnprocessedItems },
963963
options.capacity ? { ReturnConsumedCapacity: options.capacity.toUpperCase() } : null,
964964
options.metrics ? { ReturnItemCollectionMetrics: options.metrics.toUpperCase() } : null
965965
)).promise()

0 commit comments

Comments
 (0)