com.github.andriykuba.play.reactivemongo.shortcuts
Find all documents in one method call.
Find all documents in one method call.
the document selector
a list of documents, wrapped in a Future
Get collection in one method call
Get collection in one method call
the collection, wrapped in a Future
Shortcut for the collection.count() method
Define the new collection name that is prefixed by this name.
Define the new collection name that is prefixed by this name.
For example this collection is named "application", then
defineSubCollectionName("users") will return "application.users".
the name of the sub collection
string that consists from the current collections name and passed name
Get a field from a single document.
Get a field from a single document.
Field type T is obligatory
the document selector
the name of the field
field value as T, wrapped in a Future
Get a field from a single document.
Get a field from a single document.
The single document is taken by one method.
the document selector
the name of the field
optional field value in a JsValue form, wrapped in a Future
Get a field from a single document.
Get a field from a single document.
Field type T is obligatory
the document selector
the name of the field
optional field value as T, wrapped in a Future
Get a string field from a single document or empty string if no document or file was found.
Get a string field from a single document or empty string if no document or file was found.
Empty string returned if no document was found or no field was found in the document.
the document selector
the name of the field
field value or empty string, wrapped in a Future
Find in one method call.
Find in one method call.
It's half-cooked method, that returns CursorProducer.
For the JsObject ('s) result:
Use the all(JsObject, JsObject) to find a set of document
Use the one(JsObject, JsObject) to find one.
the document selector
CursorProducer, wrapped in a Future
The first document from the founded collection of documents.
The first document from the founded collection of documents.
the document selector
first found document, optional, wrapped in a Future
Do foldWhile on the collection in one method call.
Do foldWhile on the collection in one method call.
the document selector
the Folder object with start value and fold function
final result of a fold function, wrapped in a Future
Do foldWhileM on the collection in one method call.
Do foldWhileM on the collection in one method call.
the document selector
the FolderM object with start value and fold function
final result of a fold function, wrapped in a Future
Find zero or one document in one method call.
Find zero or one document in one method call. Exception will be thrown if more than one document found.
the document selector
document, optional, wrapped in a Future
Finds some matching document, and removes it (using findAndModify).
Finds some matching document, and removes it (using findAndModify).
the document selector
true if document was removed or false if it was not found, wrapped in Future
Finds some matching document, and updates it (using findAndModify).
Finds some matching document, and updates it (using findAndModify).
the document selector
the update to be applied
the command result must be the new object instead of the old one.
if true, creates a new document if no document is matching, otherwise if at least one document matches, an update is applied
a result document as JsObject, wrapped in Future
Shortcut of the
JSONCollection