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 parameters:
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 parameters:
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 parameters:
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 parameters:
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 parameters:
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 parameters:
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 parameters:
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 parameters:
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 parameters:
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 parameters:
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 parameters:
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 parameters:
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 parameters:
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 parameters:
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 parameters:
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 parameters:
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 parameters:
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

def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product