package collections
Type Members
- trait ChangeStreamOps[P <: SerializationPack with Singleton] extends AnyRef
- trait DeleteOps[P <: SerializationPack with Singleton] extends AnyRef
- trait FindAndModifyOps[P <: SerializationPack with Singleton] extends AnyRef
- trait GenericCollection[P <: SerializationPack with Singleton] extends Collection with GenericCollectionWithCommands[P] with CollectionMetaCommands with ImplicitCommandHelpers[P] with InsertOps[P] with UpdateOps[P] with DeleteOps[P] with CountOp[P] with DistinctOp[P] with GenericCollectionWithDistinctOps[P] with FindAndModifyOps[P] with ChangeStreamOps[P] with Aggregator[P] with GenericCollectionMetaCommands[P] with GenericCollectionWithQueryBuilder[P] with HintFactory[P]
A Collection that provides default methods using a
SerializationPack
.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.- P
the serialization pack
- trait GenericCollectionProducer[P <: SerializationPack with Singleton, +C <: GenericCollection[P]] extends CollectionProducer[C]
- trait GenericCollectionWithCommands[P <: SerializationPack with Singleton] extends AnyRef
Collection operations to run commands with
- sealed trait Hint[P <: SerializationPack with Singleton] extends AnyRef
- trait InsertOps[P <: SerializationPack with Singleton] extends AnyRef
- trait UpdateOps[P <: SerializationPack with Singleton] extends AnyRef
Deprecated Type Members
- trait BatchCommands[P <: SerializationPack] extends AnyRef
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Will be removed
- trait GenericQueryBuilder[P <: SerializationPack] extends QueryOps
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, orone
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] }
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private