 
 ;;;; Misc. helpers
 
-;; TODO Automatic throughput adjustment tools
-
 (defn items-by-attrs
   "Groups one or more items by one or more attributes, returning a map of form
   {<attr-val> <item> ...} or {{<attr> <val> ...} <item>}.

    :index         - Name of a secondary index to query.
    :order         - Index scaning order e/o #{:asc :desc}.
    :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 max-reqs return index order limit consistent?
              return-cc?] :as opts

  "Retrieves items from a table (unindexed) with options:
    :attr-conds     - {<attr> [<comparison-operator> <values>] ...}.
    :limit          - Max num >=1 of items to eval (≠ num of matching items).
                      Useful to prevent harmful sudden bursts of read activity.
    :last-prim-kvs  - Primary key-val from which to eval, useful for paging.
    :max-reqs       - Max number of requests to automatically stitch together.
    :return         - e/o #{:all-attributes :all-projected-attributes :count
