        limit          (.setLimit             (long g))
        total-segments (.setTotalSegments     (long g))
        segment        (.setSegment           (long g))
-       (coll? return)       (.setAttributesToGet (mapv name return))
-       (not (coll? return)) (.setSelect (utils/enum return))))))
+       (coll? return) (.setAttributesToGet (mapv name return))
+       (and return (not (coll? return))) (.setSelect (utils/enum return))))))
 
 (defn scan-parallel
   "Like `scan` but starts a number of worker threads and automatically handles

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

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

    :total-segments - total number of parallel scan segments.
    :segment        - calling worker's segment number (>=0, <=total-segments).

  comparison-operators e/o #{:eq :le :lt :ge :gt :begins-with :between :ne
                             :not-null :null :contains :not-contains :in}.

  For automatic parallelization & segment control see `scan-parallel`.
  For indexed item retrievel see `query`."
  [creds table
   & [{:keys [attr-conds last-prim-kvs return limit total-segments segment]}]]
  (as-map
   (.scan (db-client creds)
     (doto-maybe (ScanRequest.) g
