Skip to content
Jesse Schoch edited this page May 8, 2015 · 2 revisions

a few notes

default test mix env is setup to use dynamodb local

stream_* embeds it's items in "Items"

{:ok,
 %{"Count" => 1, "Items" => #Function<25.29647706/2 in Stream.resource/3>,
   "LastEvaluatedKey" => %{"email" => %{"S" => "bubba@foo.com"}},
   "ScannedCount" => 1}}

simple fetch items from stream query, would be nice to have stream_scan!

iex(18)> {:ok,map} = Dynamo.stream_scan("Users", limit: 1)
iex(23)> map["Items"]  |> Stream.map(&(ExAws.Dynamo.Decoder.decode&1))|>Enum.to_list      [%{"admin" => false, "age" => 23, "email" => "bubba@foo.com",
   "name" => "Bubba"}]