 ;; * Docs.
 ;; * Bench.
 
-;;;; DynamoDB API objects
+;;;; API - core objects
 
 (defn- db-client*
   "Returns a new AmazonDynamoDBClient instance for the supplied IAM credentials."


(defn- clj-val->db-val
  "Returns an AttributeValue object for given Clojure value."
  ;; TODO Nippy support (will require special marker bin-wrapping), incl.
  ;; Serialized (boxed) type (should allow empty strings & ANY type of set)
  ;; Maybe require special wrapper types for writing bins/serialized
  [x]
  (cond
   (string? x)          (if (.isEmpty ^String x)

             (partition 3 (flatten reqs))))
          (group-by #(name (second %)) requests)))))))

;;;; API - queries & scans

(defn- result-map [results]
  {:items    (map db-map->clj-map (.getItems results))
   :count    (.getCount results)
   :last-key (as-map (.getLastEvaluatedKey results))})

