Mongo.find_one
You're seeing just the function
find_one
, go back to Mongo module for more information.
Specs
find_one(GenServer.server(), collection(), BSON.document(), Keyword.t()) :: BSON.document() | nil
Selects a single document in a collection and returns either a document or nil.
If multiple documents satisfy the query, this method returns the first document according to the natural order which reflects the order of documents on the disk.
For all options see Options
Use the underscore style, for example to set the option readConcern
use read_concern
. Another example:
Mongo.find_one(top, "jobs", %{}, read_concern: %{level: "local"})