Permalink
Browse files

setting table name prefix for batch write item

  • Loading branch information...
1 parent be473ce commit 994a374a4fbf35d8ed3b11ba0b046f64a2e1f96a Ryan Fitzgerald committed Apr 23, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/dynode/client.js
  2. +1 −1 package.json
View
4 lib/dynode/client.js
@@ -185,7 +185,7 @@ Client.prototype.batchWriteItem = function(options, cb) {
return memo;
}, {});
-
+
this._request("BatchWriteItem", {RequestItems: request}, cb);
};
@@ -255,7 +255,7 @@ Client.prototype._prefixTableName = function(action, options) {
if(options.TableName) {
options.TableName = self.config.tableNamePrefix + options.TableName;
- } else if(action === 'BatchGetItem') {
+ } else if(action === 'BatchGetItem' || action === 'BatchWriteItem') {
var items = _.reduce(options.RequestItems, function(memo, attrs, table) {
var prefixTableName = self.config.tableNamePrefix + table;
memo[prefixTableName] = attrs;
View
2 package.json
@@ -1,7 +1,7 @@
{
"name": "dynode",
"description": "node.js client for Amazon's DynamoDB",
- "version": "0.4.1",
+ "version": "0.4.2",
"author": "Ryan Fitzgerald <ryan@codebrewstudios.com>",
"repository": {
"type": "git",

0 comments on commit 994a374

Please sign in to comment.