Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated docs

  • Loading branch information...
commit 65f19981901b425e8f9c9620d3b1f22f973f8db7 1 parent 839ef6c
Steen Larsen authored
Showing with 6 additions and 0 deletions.
  1. +4 −0 README.md
  2. +2 −0  src/dynamo4clj/core.clj
4 README.md
View
@@ -56,6 +56,10 @@ protocol=https
(find-items client "table" "NORMAL" true ["between" 715 815])
(find-items client "table" "NORMAL" true ["between" 715 815] [:attr1 :attr2])
+
+ (batch-write client {:table1 [{:id \"foo1\" :key \"bar1\"} {:id \"foo2\" :key \"bar2\"}] :table2 [{:id2 \"foo1\" :key2 \"bar1\"} {:id2 \"foo2\" :key2 \"bar2\"}]})
+
+ (batch-delete client {:table1 [\"hash1\" \"hash2\"] :table2 [[\"hash1\" \"range1\"] [\"hash2\" \"range2\"]]})
Return values have meta data containing consumed units, count and lastkey where applicable.
2  src/dynamo4clj/core.clj
View
@@ -246,7 +246,9 @@
batch-result))
(defn batch-write [client write-map]
+ "write in batch with the form {:table1 [{:id \"foo1\" :key \"bar1\"} {:id \"foo2\" :key \"bar2\"}] :table2 [{:id2 \"foo1\" :key2 \"bar1\"} {:id2 \"foo2\" :key2 \"bar2\"}]}"
(batch-del-write client write-map "w"))
(defn batch-delete [client delete-map]
+ "delete in batch with the form {:table1 [\"hash1\" \"hash2\"] :table2 [[\"hash1\" \"range1\"] [\"hash2\" \"range2\"]]}"
(batch-del-write client delete-map "d"))
Please sign in to comment.
Something went wrong with that request. Please try again.