     :put    (doto (WriteRequest.) (.setPutRequest    (doto (PutRequest.)    (.setItem item))))
     :delete (doto (WriteRequest.) (.setDeleteRequest (doto (DeleteRequest.) (.setKey  item))))))
 
-(defn- batch-write-item*
-  [creds raw-request]
-  (merge-unprocessed creds batch-write-item*
-   (as-map
-    (.batchWriteItem (db-client creds)
-      (doto (BatchWriteItemRequest.)
-        (.setRequestItems raw-request))))))
-
 (defn batch-write-item
   "Executes a batch of Puts and/or Deletes in a single request.
    Limits apply, Ref. http://goo.gl/Bj9TC. No transaction guarantees are

                                               consumed-capacity*))}
                      (when (or items items*)
                        {:items (into (or items []) items*)})))))))

(defn- batch-get-item* [creds raw-request]
  (merge-unprocessed creds batch-get-item*
   (as-map
    (.batchGetItem (db-client creds)
      (doto (BatchGetItemRequest.) ; {table-str KeysAndAttributes}
        (.setRequestItems raw-request))))))

(defn batch-get-item
  "Retrieves a batch of items in a single request.

       :always  (.setKey              (clj-item->db-item prim-kvs))
       :always  (.setAttributeUpdates (attribute-updates update-map))
       expected (.setExpected         (expected-values g))
       return   (.setReturnValues     (utils/enum g))
       return-cc? (.setReturnConsumedCapacity (utils/enum :total))))))

(defn delete-item
  "Deletes an item from a table by its primary key.
  See `put-item` for option docs."
  [creds table prim-kvs & [{:keys [return expected return-cc?]
                            :or   {return :none}}]]
  (as-map
   (.deleteItem (db-client creds)
