Skip to content

Commit

Permalink
Get count info from meta as itoshkov suggested.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Gordon committed Jun 27, 2012
1 parent b2d70a9 commit be0151c
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/rotary/client.clj
Original file line number Diff line number Diff line change
Expand Up @@ -432,14 +432,12 @@
(db-client cred)
(query-request table hash-key range-clause options))
item-count (.getCount query-result)]
(if (get options :count)
item-count
(with-meta
(map item-map (or (.getItems query-result) {}))
(merge {:count item-count
:consumed-capacity-units (.getConsumedCapacityUnits query-result)}
(if-let [k (.getLastEvaluatedKey query-result)]
{:last-evaluated-key (decode-key k)}))))))
(with-meta
(map item-map (or (.getItems query-result) {}))
(merge {:count item-count
:consumed-capacity-units (.getConsumedCapacityUnits query-result)}
(if-let [k (.getLastEvaluatedKey query-result)]
{:last-evaluated-key (decode-key k)})))))

(defn- to-scan-filter
[scan-filter]
Expand Down

0 comments on commit be0151c

Please sign in to comment.