taoensso / faraday

Amazon DynamoDB client for Clojure
https://www.taoensso.com/faraday
Eclipse Public License 1.0
238 stars 84 forks source link

Question: how to get response elements for table scan #5

Closed dkincaid closed 10 years ago

dkincaid commented 11 years ago

Calling the scan function seems to just return the items from the table. How do I get the other elements returned from the scan (like LastEvaluatedKey)?

Thanks.

ptaoussanis commented 10 years ago

Hi Dave, you can call meta on the scan result:

(scan creds :faraday.tundra.datastore.default.prod {:limit 1})
=> [<...>] ; Collection of returned items

(meta (scan creds :faraday.tundra.datastore.default.prod {:limit 1}))
=> {:scanned-count 5, :last-prim-kvs {:key-ns "default", :redis-key "k3"}, :cc-units nil, :count 5}

Hope that helps, cheers!

dkincaid commented 10 years ago

Ah! Thank you very much.