FindQueryBuilder

final case
class FindQueryBuilder[F[_], T] extends QueryBuilder[[TResult <: <FromJavaObject>] =>> FindPublisher[TResult], T]
trait Serializable
trait Product
trait Equals
trait QueryBuilder[[TResult <: <FromJavaObject>] =>> FindPublisher[TResult], T]
class Object
trait Matchable
class Any

Value members

Concrete methods

def all: F[Iterable[T]]
def boundedStream(capacity: Int): Stream[F, T]
def collation(collation: Collation): FindQueryBuilder[F, T]

Sets the collation options

Sets the collation options

A null value represents the server default.

Value Params
collation

the collation options to use

Returns

FindQueryBuilder

Since

1.3

def comment(comment: String): FindQueryBuilder[F, T]

Sets the comment to the query. A null value means no comment is set.

Sets the comment to the query. A null value means no comment is set.

Value Params
comment

the comment

Returns

FindQueryBuilder

Since

1.6

Explain the execution plan for this operation with the server's default verbosity level

Explain the execution plan for this operation with the server's default verbosity level

Returns

the execution plan

Since

4.2

def explain(verbosity: ExplainVerbosity): F[Document]

Explain the execution plan for this operation with the given verbosity level

Explain the execution plan for this operation with the given verbosity level

Value Params
verbosity

the verbosity of the explanation

Returns

the execution plan

Since

4.2

def filter(filter: Bson): FindQueryBuilder[F, T]

Sets the query filter to apply to the query.

Sets the query filter to apply to the query.

Value Params
filter

the filter

Returns

FindQueryBuilder

def filter(filters: Filter): FindQueryBuilder[F, T]
def first: F[Option[T]]
def hint(index: String): FindQueryBuilder[F, T]

Sets the hint for which index to use. A null value means no hint is set.

Sets the hint for which index to use. A null value means no hint is set.

Value Params
index

the name of the index which should be used for the operation

Returns

FindQueryBuilder

Since

1.13

def hint(hint: Bson): FindQueryBuilder[F, T]

Sets the hint for which index to use. A null value means no hint is set.

Sets the hint for which index to use. A null value means no hint is set.

Value Params
hint

the hint

Returns

FindQueryBuilder

Since

1.6

def limit(limit: Int): FindQueryBuilder[F, T]

Sets the limit to apply.

Sets the limit to apply.

Value Params
limit

the limit

Returns

FindQueryBuilder

def max(max: Bson): FindQueryBuilder[F, T]

Sets the exclusive upper bound for a specific index. A null value means no max is set.

Sets the exclusive upper bound for a specific index. A null value means no max is set.

Value Params
max

the max

Returns

this

Since

1.6

def maxAwaitTime(duration: Duration): FindQueryBuilder[F, T]

The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query. This only applies to a TAILABLE_AWAIT cursor. When the cursor is not a TAILABLE_AWAIT cursor, this option is ignored.

The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query. This only applies to a TAILABLE_AWAIT cursor. When the cursor is not a TAILABLE_AWAIT cursor, this option is ignored.

On servers >= 3.2, this option will be specified on the getMore command as "maxTimeMS". The default is no value: no "maxTimeMS" is sent to the server with the getMore command.

On servers < 3.2, this option is ignored, and indicates that the driver should respect the server's default value

A zero value will be ignored.

Value Params
duration

the max await time

Returns

the maximum await execution time in the given time unit

def maxTime(duration: Duration): FindQueryBuilder[F, T]

Sets the maximum execution time on the server for this operation.

Sets the maximum execution time on the server for this operation.

Value Params
duration

the max time

Returns

FindQueryBuilder

def min(min: Bson): FindQueryBuilder[F, T]

Sets the minimum inclusive lower bound for a specific index. A null value means no max is set.

Sets the minimum inclusive lower bound for a specific index. A null value means no max is set.

Value Params
min

the min

Returns

this

Since

1.6

def partial(partial: Boolean): FindQueryBuilder[F, T]

Get partial results from a sharded cluster if one or more shards are unreachable (instead of throwing an error).

Get partial results from a sharded cluster if one or more shards are unreachable (instead of throwing an error).

Value Params
partial

if partial results for sharded clusters is enabled

Returns

FindQueryBuilder

def projection(projection: Bson): FindQueryBuilder[F, T]

Sets a document describing the fields to return for all matching documents.

Sets a document describing the fields to return for all matching documents.

Value Params
projection

the project document, which may be null.

Returns

FindQueryBuilder

def projection(projection: Projection): FindQueryBuilder[F, T]
def returnKey(returnKey: Boolean): FindQueryBuilder[F, T]

Sets the returnKey. If true the find operation will return only the index keys in the resulting documents.

Sets the returnKey. If true the find operation will return only the index keys in the resulting documents.

Value Params
returnKey

the returnKey

Returns

FindQueryBuilder

Since

1.6

def showRecordId(showRecordId: Boolean): FindQueryBuilder[F, T]

Sets the showRecordId. Set to true to add a field $recordId to the returned documents.

Sets the showRecordId. Set to true to add a field $recordId to the returned documents.

Value Params
showRecordId

the showRecordId

Returns

FindQueryBuilder

Since

1.6

def skip(skip: Int): FindQueryBuilder[F, T]

Sets the number of documents to skip.

Sets the number of documents to skip.

Value Params
skip

the number of documents to skip

Returns

FindQueryBuilder

def sort(sort: Bson): FindQueryBuilder[F, T]

Sets the sort criteria to apply to the query.

Sets the sort criteria to apply to the query.

Value Params
sort

the sort criteria, which may be null.

Returns

FindQueryBuilder

def sort(sorts: Sort): FindQueryBuilder[F, T]
def sortBy(fieldNames: String*): FindQueryBuilder[F, T]
def sortByDesc(fieldNames: String*): FindQueryBuilder[F, T]
def stream: Stream[F, T]

Inherited methods

protected
def applyCommands(): FindPublisher[T]
Inherited from
QueryBuilder
def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product