Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

letting batch write item take amazon style requests

  • Loading branch information...
commit e1c71d25de60cde0e4a227cc71768dd4b03c9586 1 parent 58204c2
@ryanfitz ryanfitz authored
Showing with 3 additions and 9 deletions.
  1. +2 −8 lib/dynode/client.js
  2. +1 −1  package.json
View
10 lib/dynode/client.js
@@ -181,24 +181,18 @@ Client.prototype.batchWriteItem = function(options, cb) {
} else if(req.del) {
return {DeleteRequest : {Key: Types.toKeys(req.del)}};
} else {
- return cb(new Error("Bad BatchWriteRequest"));
+ return req;
}
});
return memo;
}, {});
- self._batchWriteItemRequest(request, cb);
-};
-
-Client.prototype._batchWriteItemRequest = function(request, cb) {
- var self = this;
-
this._request("BatchWriteItem", {RequestItems: request}, function(err, response){
if(err) return cb(err);
if(response.UnprocessedItems && Object.keys(response.UnprocessedItems).length > 0){
- return self._batchWriteItemRequest(response.UnprocessedItems, cb);
+ return self.batchWriteItem(response.UnprocessedItems, cb);
} else {
return cb(null, response);
}
View
2  package.json
@@ -1,7 +1,7 @@
{
"name": "dynode",
"description": "node.js client for Amazon's DynamoDB",
- "version": "0.4.4",
+ "version": "0.4.5",
"author": "Ryan Fitzgerald <ryan@codebrewstudios.com>",
"repository": {
"type": "git",
Please sign in to comment.
Something went wrong with that request. Please try again.