(Since version 0.16.0) Internal: will be made private
Toggles AwaitData: Block a little while waiting for more data instead of returning immediately if no data.
Toggles AwaitData: Block a little while waiting for more data instead of returning immediately if no data. Use along with TailableCursor.
Sets an upper limit on the number of documents to retrieve per batch.
Sets an upper limit on the number of documents to retrieve per batch. Defaults to 0 (meaning no upper limit - MongoDB decides).
Adds a comment to this query, that may appear in the MongoDB logs.
Makes a Cursor of this query, which can be enumerated.
Makes a Cursor of this query, which can be enumerated.
the results type
The reactivemongo.api.ReadPreference for this query. If the ReadPreference
implies that this query can be run on a secondary, the slaveOk flag will be set.
the reader for the results type
Toggles Exhaust
Toggles Exhaust
Toggles explain mode.
Sets the hint document (a document that declares the index MongoDB should use for this query).
Adds maxTimeMs to query https://docs.mongodb.org/v3.0/reference/operator/meta/maxTimeMS/
Toggles NoCursorTimeout: The cursor will not expire automatically
Toggles NoCursorTimeout: The cursor will not expire automatically
Sends this query and gets a future Option[T]
(alias for reactivemongo.api.Cursor.headOption).
Sends this query and gets a future Option[T]
(alias for reactivemongo.api.Cursor.headOption).
the results type
The reactivemongo.api.ReadPreference for this query. If the ReadPreference
implies that this query can be run on a secondary, the slaveOk flag will be set.
the reader for the results type
Sends this query and gets a future Option[T]
(alias for reactivemongo.api.Cursor.headOption).
Sends this query and gets a future Option[T]
(alias for reactivemongo.api.Cursor.headOption).
the results type
the reader for the results type
Toggles OplogReplay
Toggles OplogReplay
Toggles Partial: The response can be partial - if a shard is down, no error will be thrown.
Toggles Partial: The response can be partial - if a shard is down, no error will be thrown.
Sets the projection document (for retrieving only a subset of fields).
Sets the projection document (for retrieving only a subset of fields).
Sets the projection document (for retrieving only a subset of fields).
The type of the projection. An implicit Writer[Pjn]
typeclass for handling it has to be in the scope.
Sets the query (the selector document).
Sets the selector document.
Sets the selector document.
The type of the query. An implicit Writer[Qry]
typeclass for handling it has to be in the scope.
The read concern (since 3.2)
Sends this query and gets a future T
(alias for reactivemongo.api.Cursor.head).
Sends this query and gets a future T
(alias for reactivemongo.api.Cursor.head).
the results type
The reactivemongo.api.ReadPreference for this query. If the ReadPreference
implies that this query can be run on a secondary, the slaveOk flag will be set.
the reader for the results type
Sends this query and gets a future T
(alias for reactivemongo.api.Cursor.head).
Sends this query and gets a future T
(alias for reactivemongo.api.Cursor.head).
the results type
the reader for the results type
Sets the number of documents to skip.
Sets the number of documents to skip.
Toggles SlaveOk: The query is might be run on a secondary.
Toggles SlaveOk: The query is might be run on a secondary.
Toggles snapshot mode.
Sets the sorting document.
Toggles TailableCursor: Makes the cursor not to close after all the data is consumed.
Toggles TailableCursor: Makes the cursor not to close after all the data is consumed.
The default ReadPreference
The default ReadPreference
(Since version 0.16.0) Internal: will be made private
(Since version 0.12.4) Use options
or the separate query ops
A builder that helps to make a fine-tuned query to MongoDB.
When the query is ready, you can call
cursor
to get a Cursor, orone
if you want to retrieve just one document.(Since version 0.16.0) Internal: will be made private