Mongo.Find
Find operation on MongoDB
Summary
addSpecial(find, k, v) | |
exec(find) | Executes the query and returns a |
explain(find) | Runs the explain operator that provides information on the query plan |
hint(f, hints) | Add hint opperator that forces the query optimizer to use a specific index to fulfill the query |
new(collection, jsString, projector) | Creates a new find operation |
opts(find, options) | Sets query options |
skip(find, skip) | Sets where MongoDB begins returning results |
Functions
Runs the explain operator that provides information on the query plan
Add hint opperator that forces the query optimizer to use a specific index to fulfill the query
Creates a new find operation.
Not to be used directly, prefer Mongo.Collection.find/3
Sets query options
Defaults option set is equivalent of calling:
Find.opts(
awaitdata: false
nocursortimeout: false
slaveok: true
tailablecursor: false)
Sets where MongoDB begins returning results
Must be run before executing the query
iex> Mongo.connect.%@m{"test"}.collection("anycoll").find.skip(1).toArray |> Enum.count
5
iex> Mongo.connect.%@m{"test"}.collection("anycoll").find.skip(2).toArray |> Enum.count
4