case class BSONQueryBuilder(collection: Collection, failoverStrategy: FailoverStrategy, queryOption: Option[BSONDocument] = None, sortOption: Option[BSONDocument] = None, projectionOption: Option[BSONDocument] = None, hintOption: Option[BSONDocument] = None, explainFlag: Boolean = false, snapshotFlag: Boolean = false, commentString: Option[String] = None, options: QueryOpts = QueryOpts(), maxTimeMsOption: Option[Long] = None) extends GenericQueryBuilder[BSONSerializationPack.type] with Product with Serializable
- Annotations
- @SerialVersionUID() @deprecated
- Deprecated
(Since version 0.16.0) Useless, will be remove
- Alphabetic
- By Inheritance
- BSONQueryBuilder
- Serializable
- Product
- Equals
- GenericQueryBuilder
- QueryOps
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new BSONQueryBuilder(collection: Collection, failoverStrategy: FailoverStrategy, queryOption: Option[BSONDocument] = None, sortOption: Option[BSONDocument] = None, projectionOption: Option[BSONDocument] = None, hintOption: Option[BSONDocument] = None, explainFlag: Boolean = false, snapshotFlag: Boolean = false, commentString: Option[String] = None, options: QueryOpts = QueryOpts(), maxTimeMsOption: Option[Long] = None)
Type Members
- type Self = BSONQueryBuilder
- Definition Classes
- BSONQueryBuilder → GenericQueryBuilder → QueryOps
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- Implicit
- This member is added by an implicit conversion from BSONQueryBuilder toany2stringadd[BSONQueryBuilder] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
- def ->[B](y: B): (BSONQueryBuilder, B)
- Implicit
- This member is added by an implicit conversion from BSONQueryBuilder toArrowAssoc[BSONQueryBuilder] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def awaitData: Self
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.
- Definition Classes
- GenericQueryBuilder → QueryOps
- def batchSize(n: Int): Self
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).
- Definition Classes
- GenericQueryBuilder → QueryOps
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val collection: Collection
- Definition Classes
- BSONQueryBuilder → GenericQueryBuilder
- def comment(message: String): Self
Adds a comment to this query, that may appear in the MongoDB logs.
Adds a comment to this query, that may appear in the MongoDB logs.
- Definition Classes
- GenericQueryBuilder
- val commentString: Option[String]
- Definition Classes
- BSONQueryBuilder → GenericQueryBuilder
- def copy(queryOption: Option[BSONDocument] = queryOption, sortOption: Option[BSONDocument] = sortOption, projectionOption: Option[BSONDocument] = projectionOption, hintOption: Option[BSONDocument] = hintOption, explainFlag: Boolean = explainFlag, snapshotFlag: Boolean = snapshotFlag, commentString: Option[String] = commentString, options: QueryOpts = options, failoverStrategy: FailoverStrategy = failoverStrategy, maxTimeMsOption: Option[Long] = maxTimeMsOption): BSONQueryBuilder
- Definition Classes
- BSONQueryBuilder → GenericQueryBuilder
- def cursor[T](readPreference: ReadPreference = readPreference, isMongo26WriteOp: Boolean = false)(implicit reader: Reader[T], cp: CursorProducer[T]): ProducedCursor
Returns a Cursor for the result of this query.
Returns a Cursor for the result of this query.
- T
the results type
- readPreference
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.- reader
the reader for the results type
- Definition Classes
- GenericQueryBuilder
- def ensuring(cond: (BSONQueryBuilder) => Boolean, msg: => Any): BSONQueryBuilder
- Implicit
- This member is added by an implicit conversion from BSONQueryBuilder toEnsuring[BSONQueryBuilder] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: (BSONQueryBuilder) => Boolean): BSONQueryBuilder
- Implicit
- This member is added by an implicit conversion from BSONQueryBuilder toEnsuring[BSONQueryBuilder] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean, msg: => Any): BSONQueryBuilder
- Implicit
- This member is added by an implicit conversion from BSONQueryBuilder toEnsuring[BSONQueryBuilder] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean): BSONQueryBuilder
- Implicit
- This member is added by an implicit conversion from BSONQueryBuilder toEnsuring[BSONQueryBuilder] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def exhaust: Self
Toggles Exhaust
Toggles Exhaust
- Definition Classes
- GenericQueryBuilder → QueryOps
- def explain(flag: Boolean = true): Self
Toggles explain mode.
Toggles explain mode.
- Definition Classes
- GenericQueryBuilder
- val explainFlag: Boolean
- Definition Classes
- BSONQueryBuilder → GenericQueryBuilder
- val failoverStrategy: FailoverStrategy
- Definition Classes
- BSONQueryBuilder → GenericQueryBuilder
- def filter(predicate: Document): Self
Sets the query predicate; If unspecified, then all documents in the collection will match the predicate.
Sets the query predicate; If unspecified, then all documents in the collection will match the predicate.
- Definition Classes
- GenericQueryBuilder
- def filter[Qry](predicate: Qry)(implicit writer: Writer[Qry]): Self
Sets the query predicate; If unspecified, then all documents in the collection will match the predicate.
Sets the query predicate; If unspecified, then all documents in the collection will match the predicate.
- Qry
The type of the query. An implicit
Writer[Qry]
typeclass for handling it has to be in the scope.
- Definition Classes
- GenericQueryBuilder
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from BSONQueryBuilder toStringFormat[BSONQueryBuilder] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hint(document: Document): Self
Sets the hint document (a document that declares the index MongoDB should use for this query).
Sets the hint document (a document that declares the index MongoDB should use for this query).
- Definition Classes
- GenericQueryBuilder
- val hintOption: Option[BSONDocument]
- Definition Classes
- BSONQueryBuilder → GenericQueryBuilder
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def maxTimeMs(p: Long): Self
Adds maxTimeMs to query https://docs.mongodb.org/v3.0/reference/operator/meta/maxTimeMS/
Adds maxTimeMs to query https://docs.mongodb.org/v3.0/reference/operator/meta/maxTimeMS/
- Definition Classes
- GenericQueryBuilder
- val maxTimeMsOption: Option[Long]
- Definition Classes
- BSONQueryBuilder → GenericQueryBuilder
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def noCursorTimeout: Self
Toggles NoCursorTimeout: The cursor will not expire automatically
Toggles NoCursorTimeout: The cursor will not expire automatically
- Definition Classes
- GenericQueryBuilder → QueryOps
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def one[T](readPreference: ReadPreference)(implicit reader: Reader[T], ec: ExecutionContext): Future[Option[T]]
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).- T
the results type
- readPreference
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.- reader
the reader for the results type
- Definition Classes
- GenericQueryBuilder
- def one[T](implicit reader: Reader[T], ec: ExecutionContext): Future[Option[T]]
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).- T
the results type
- reader
the reader for the results type
- Definition Classes
- GenericQueryBuilder
- def oplogReplay: Self
Toggles OplogReplay
Toggles OplogReplay
- Definition Classes
- GenericQueryBuilder → QueryOps
- def options(options: QueryOpts): Self
- Definition Classes
- GenericQueryBuilder
- val options: QueryOpts
- Definition Classes
- BSONQueryBuilder → GenericQueryBuilder
- val pack: BSONSerializationPack.type
- Definition Classes
- BSONQueryBuilder → GenericQueryBuilder
- def partial: Self
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.
- Definition Classes
- GenericQueryBuilder → QueryOps
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def projection(p: Document): Self
Sets the projection specification to determine which fields to include in the returned documents.
Sets the projection specification to determine which fields to include in the returned documents.
- Definition Classes
- GenericQueryBuilder
- def projection[Pjn](p: Pjn)(implicit writer: Writer[Pjn]): Self
Sets the projection specification to determine which fields to include in the returned documents.
Sets the projection specification to determine which fields to include in the returned documents.
- Pjn
The type of the projection. An implicit
Writer[Pjn]
typeclass for handling it has to be in the scope.
- Definition Classes
- GenericQueryBuilder
- val projectionOption: Option[BSONDocument]
- Definition Classes
- BSONQueryBuilder → GenericQueryBuilder
- val queryOption: Option[BSONDocument]
- Definition Classes
- BSONQueryBuilder → GenericQueryBuilder
- def readConcern: ReadConcern
The read concern (since 3.2)
The read concern (since 3.2)
- Definition Classes
- GenericQueryBuilder
- def requireOne[T](readPreference: ReadPreference)(implicit reader: Reader[T], ec: ExecutionContext): Future[T]
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).- T
the results type
- readPreference
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.- reader
the reader for the results type
- Definition Classes
- GenericQueryBuilder
- def requireOne[T](implicit reader: Reader[T], ec: ExecutionContext): Future[T]
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).- T
the results type
- reader
the reader for the results type
- Definition Classes
- GenericQueryBuilder
- def skip(n: Int): Self
Sets the number of documents to skip.
Sets the number of documents to skip.
- Definition Classes
- GenericQueryBuilder → QueryOps
- def slaveOk: Self
Toggles SlaveOk: The query is might be run on a secondary.
Toggles SlaveOk: The query is might be run on a secondary.
- Definition Classes
- GenericQueryBuilder → QueryOps
- def snapshot(flag: Boolean = true): Self
Toggles snapshot mode.
Toggles snapshot mode.
- Definition Classes
- GenericQueryBuilder
- val snapshotFlag: Boolean
- Definition Classes
- BSONQueryBuilder → GenericQueryBuilder
- def sort(document: Document): Self
Sets the sort specification for the ordering of the results.
Sets the sort specification for the ordering of the results.
- Definition Classes
- GenericQueryBuilder
- val sortOption: Option[BSONDocument]
- Definition Classes
- BSONQueryBuilder → GenericQueryBuilder
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tailable: Self
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.
- Definition Classes
- GenericQueryBuilder → QueryOps
- lazy val version: MongoWireVersion
- Attributes
- protected
- Definition Classes
- GenericQueryBuilder
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Deprecated Value Members
- def query(selector: Document): Self
- Definition Classes
- GenericQueryBuilder
- Annotations
- @deprecated
- Deprecated
(Since version 0.18.2) Use
filter
- def query[Qry](selector: Qry)(implicit writer: Writer[Qry]): Self
- Definition Classes
- GenericQueryBuilder
- Annotations
- @deprecated
- Deprecated
(Since version 0.18.2) Use
filter
- def readPreference: ReadPreference
The default ReadPreference
The default ReadPreference
- Definition Classes
- GenericQueryBuilder
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 0.16.0) Internal: will be made private
- def updateOptions(update: (QueryOpts) => QueryOpts): Self
- Definition Classes
- GenericQueryBuilder
- Annotations
- @deprecated
- Deprecated
(Since version 0.12.4) Use
options
or the separate query ops
- def →[B](y: B): (BSONQueryBuilder, B)
- Implicit
- This member is added by an implicit conversion from BSONQueryBuilder toArrowAssoc[BSONQueryBuilder] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.