    (db-client creds)
    (DeleteItemRequest. table (item-key {:hash-key hash-key}))))
 
-(extend-protocol AsMap
-  Key
-  (as-map [k]
-    {:hash-key  (db-val->clj-val (.getHashKeyElement k))
-     :range-key (db-val->clj-val (.getRangeKeyElement k))})
-  nil
-  (as-map [_] nil))
+;;;; API - batch ops
 
 (defn- batch-item-keys [request-or-keys]
   (for [key (:keys request-or-keys request-or-keys)]

    (result-map
     (.query
      (db-client creds)
      (query-request table hash-key range options)))))


(defn- clj-val->db-val
  "Returns an AttributeValue object for given Clojure value."
  [x]
  (cond
   (string? x)          (if (.isEmpty ^String x)
