DistinctQuery

case class DistinctQuery[TResult](wrapped: DistinctPublisher[TResult]) extends Query[TResult]

Observable for distinct

Type parameters:
TResult

The type of the result.

Value parameters:
wrapped

the underlying java DistinctQuery

trait Serializable
trait Product
trait Equals
trait Query[TResult]
class Object
trait Matchable
class Any

Value members

Concrete methods

def batchSize(batchSize: Int): DistinctQuery[TResult]

Sets the number of documents to return per batch.

Sets the number of documents to return per batch.

Value parameters:
batchSize

the batch size

Returns:

this

def collation(collation: Collation): DistinctQuery[TResult]

Sets the collation options

Sets the collation options

Value parameters:
collation

the collation options to use

Returns:

this

Note:

A null value represents the server default.

Requires MongoDB 3.4 or greater

def comment(comment: String): DistinctQuery[TResult]

Sets the comment for this operation. A null value means no comment is set.

Sets the comment for this operation. A null value means no comment is set.

Value parameters:
comment

the comment

Returns:

this

Note:

Requires MongoDB 4.4 or greater

def comment(comment: BsonValue): DistinctQuery[TResult]

Sets the comment for this operation. A null value means no comment is set.

Sets the comment for this operation. A null value means no comment is set.

Value parameters:
comment

the comment

Returns:

this

Note:

Requires MongoDB 4.4 or greater

override def execute: ZStream[Any, Throwable, TResult]
Definition Classes
def filter(filter: Filter): DistinctQuery[TResult]

Sets the query filter to apply to the query.

Sets the query filter to apply to the query.

Filter

Value parameters:
filter

the filter, which may be null.

Returns:

this

def first(): Task[Option[TResult]]

Helper to return a single observable limited to the first result.

Helper to return a single observable limited to the first result.

Returns:

a single observable which will the first result.

def maxTime(duration: Duration): DistinctQuery[TResult]

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

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

Max Time

Value parameters:
duration

the duration

Returns:

this

Inherited methods

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