kmongo / org.litote.kmongo.coroutine / CoroutineDistinctPublisher

CoroutineDistinctPublisher

class CoroutineDistinctPublisher<T : Any> : CoroutinePublisher<T> (source)

Coroutine wrapper around CoroutineDistinctPublisher.

Constructors

<init>

Coroutine wrapper around CoroutineDistinctPublisher.

CoroutineDistinctPublisher(publisher: DistinctPublisher<T>)

Properties

publisher

val publisher: DistinctPublisher<T>

Functions

batchSize

Sets the number of documents to return per batch.

fun batchSize(batchSize: Int): CoroutineDistinctPublisher<T>

collation

Sets the collation options

fun collation(collation: Collation): CoroutineDistinctPublisher<T>

filter

Sets the query filter to apply to the query.

fun filter(filter: Bson): CoroutineDistinctPublisher<T>

first

Helper to return a publisher limited to the first result.

suspend fun first(): T?

maxTime

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

fun maxTime(maxTime: Long, timeUnit: TimeUnit): CoroutineDistinctPublisher<T>