A Collection that provides default methods using a SerializationPack
.
Collection operations to run commands with
(Since version 0.16.0) Will be removed
A builder that helps to make a fine-tuned query to MongoDB.
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, or one
if you want to retrieve just one document.
import scala.concurrent.{ ExecutionContext, Future } import reactivemongo.api.bson.BSONDocument import reactivemongo.api.bson.collection.BSONCollection def firstFirst(coll: BSONCollection)( implicit ec: ExecutionContext): Future[Option[BSONDocument]] = { val queryBuilder = coll.find(BSONDocument.empty) queryBuilder.one[BSONDocument] }
(Since version 0.16.0) Internal: will be made private
A Collection that provides default methods using a
SerializationPack
.Some methods of this collection accept instances of
Reader[T]
andWriter[T]
, that transform anyT
instance into a document, compatible with the selected serialization pack, and vice-versa.the serialization pack