-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
I can't seem to find any documentation which explains how to decode a list of find results. So far I have a list of Mongo.Response, but I have no idea where to go from here:
# Connect the mongo server (by default port 27017 at 127.0.0.1)
mongo = Mongo.connect!
# Select the db to access
db = mongo |> Mongo.db("test")
# Select the db to access
articles = db |> Mongo.Db.collection("articles")
articles
|> Mongo.Collection.find
# |> Map.put(:batchSize, 4)
|> Mongo.Find.exec
|> Enum.to_list
|> Enum.map fn doc -> Mongo.Response.bson_decode(doc.buffer) end
|> IO.inspect
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels