         (.add attrs (ItemAttribute. (keystr k) (keystr v) true))))
     attrs))
 
-(defn- parse-attr-list [attrs]
+(defn- parse-attr-list
+  "Given a List of ItemAttribute objects, return a map of name=>value
+  and/or name=>[values]"
+  [attrs]
   (reduce (fn [m attr]
             (let [k (.getName attr), v (.getValue attr)]
               (assoc m k

                               query-string))))

(defn select-items
  ([domain-name query-string]
     (select-items domain-name query-string nil))
  ([domain-name query-string next-token]
     (reduce (fn [m [k v]] (assoc m k (parse-attr-list v)))
             {} (.getItems (.selectItems (get-domain domain-name)
                                         query-string next-token)))))

(defn delete-where [domain-name query-string]
  (doseq [item (list-items domain-name query-string)]
    (delete-item domain-name (.getIdentifier item))))

(defn- keystr [x]
  (if (keyword? x) (name x) (str x)))

(defn- make-attr-list
  "Given a map of key=>value or key=>[values], return a List of
  ItemAttribute objects."
  [keyvals]
  (let [attrs (ArrayList.)]
    (doseq [[k v] keyvals]
      (if (coll? v)
