Skip to content
Browse files

updating readme with batchWriteItem info

  • Loading branch information...
1 parent 45664fd commit 91543c148b6045688a977303320deb3051907956 Ryan Fitzgerald committed Apr 19, 2012
Showing with 26 additions and 5 deletions.
  1. +26 −5 README.md
View
31 README.md
@@ -58,6 +58,7 @@ Callbacks return (error, [results], meta) where results are the returned data an
* [Query](#query)
* [Scan](#scan)
* [Batch Get Item](#batchGetItem)
+* [Batch Write Item](#batchWriteItem)
* [Truncate](#truncate)
<a name="auth"></a>
@@ -326,11 +327,23 @@ The BatchGetItem operation returns the attributes for multiple items from multip
dynode.batchGetItem(filter, console.log);
```
-## Tests
-All tests are written with [mocha][0] and should be run with make:
+<a name="batchWriteItem"></a>
+## Batch Write Item
+The BatchWriteItem operation This operation enables you to put or delete several items across multiple tables in a single API call. For more info see [here][batchWriteDocs]
-``` bash
- $ make test
+``` js
+ var writes = {
+ "BatchTable": [
+ {put : {id : "foo", name: "bar"}},
+ {del : "hash-key"}
+ ],
+ "AnotherTable": [
+ {del : {hash: "somekey", range: "foo"}},
+ {del : {hash: "another key", range: "moar foo"}}
+ ]
+ };
+
+ dynode.batchWriteItem(writes, console.log);
```
<a name="truncate"></a>
@@ -347,6 +360,13 @@ note - This api is not provided directly by DynamoDB.
dynode.truncate("ExampleTable", options, console.log);
```
+## Tests
+All tests are written with [mocha][0] and should be run with make:
+
+``` bash
+ $ make test
+```
+
#### Author: [Ryan Fitzgerald](http://twitter.com/#!/TheRyanFitz)
#### License: [Apache 2.0][1]
@@ -363,4 +383,5 @@ note - This api is not provided directly by DynamoDB.
[deleteItemDocs]: http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/API_DeleteItem.html
[queryDocs]: http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/API_Query.html
[scanDocs]: http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/API_Scan.html
-[batchGetDocs]: http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/API_BatchGetItems.html
+[batchGetDocs]: http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/API_BatchGetItems.html
+[batchWriteDocs]: http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/API_BatchWriteItems.html

0 comments on commit 91543c1

Please sign in to comment.
Something went wrong with that request. Please try again.