     :limit         - max num >=1 of items to eval (≠ num of matching items).
     :consistent?   - use strongly (rather than eventually) consistent reads?
 
+  comparison-operators e/o #{:eq :le :lt :ge :gt :begins-with :between}.
+
   For unindexed item retrievel see `scan`."
   [creds table prim-key-conds
    & [{:keys [last-prim-kvs return index order limit consistent?]
        :or   {order :asc}}]]
+  (println (query|scan-conditions prim-key-conds))
   (as-map
    (.query (db-client creds)
      (doto-maybe (QueryRequest.) g
        :always (.setTableName        (name table))
        :always (.setKeyConditions    (query|scan-conditions prim-key-conds))
        :always (.setScanIndexForward (case order :asc true :desc false))
-       last-prim-kvs (.setExclusiveStartKey (clj-item->db-item g))
-       limit         (.setLimit    (long g))
-       index         (.setIndexName      g)
-       consistent?   (.setConsistentRead g)
-       (coll? return)       (.setAttributesToGet (mapv name return))
-       (not (coll? return)) (.setSelect (utils/enum return))))))
+       last-prim-kvs  (.setExclusiveStartKey (clj-item->db-item g))
+       limit          (.setLimit    (long g))
+       index          (.setIndexName      g)
+       consistent?    (.setConsistentRead g)
+       (coll? return) (.setAttributesToGet (mapv name return))
+       (and return (not (coll? return))) (.setSelect (utils/enum return))))))
 
 (defn scan
   "Retrieves items from a table (unindexed) with options:
-    :attr-conds     - {<attr> [comparison-operator <values>] ...}.
+    :attr-conds     - {<attr> [<comparison-operator> <values>] ...}.
     :limit          - max num >=1 of items to eval (≠ num of matching items).
     :last-prim-kvs  - primary key-val from which to eval, useful for paging.
     :return         - e/o #{:all-attributes :all-projected-attributes :count

                  (filterv identity))]
    (mapv
     (fn [{key-name :name key-type :type :as def}]
       (doto (AttributeDefinition.)
         (.setAttributeName (name key-name))
         (.setAttributeType (utils/enum key-type))))

  "Returns a [{<hash-key> KeySchemaElement}], or
             [{<hash-key> KeySchemaElement} {<range-key> KeySchemaElement}]
   vector for use as a table/index primary key."
  [{hash-key-name :name :as hash-keydef} &
   [{range-key-name :name :as range-keydef}]]
  (assert (and hash-key-name (when range-keydef range-key-name))
          (assert (str "Malformed key schema: "
                       {:hash-keydef  hash-keydef
                        :range-keydef range-keydef})))
  (cond-> [(key-schema-element hash-key-name :hash)]
          range-keydef (conj (key-schema-element range-key-name :range))))

(defn- provisioned-throughput "Returns a new ProvisionedThroughput object."
  [{read-units :read write-units :write :as throughput}]
  (assert (and read-units write-units)
          (str "Malformed throughput: " throughput))
  (doto (ProvisionedThroughput.)
    (.setReadCapacityUnits  (long read-units))
    (.setWriteCapacityUnits (long write-units))))
