kmongo / org.litote.kmongo.coroutine / CoroutineAggregatePublisher

CoroutineAggregatePublisher

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

Coroutine wrapper around AggregatePublisher.

Constructors

<init>

Coroutine wrapper around AggregatePublisher.

CoroutineAggregatePublisher(publisher: AggregatePublisher<T>)

Properties

publisher

val publisher: AggregatePublisher<T>

Functions

allowDiskUse

Enables writing to temporary files. A null value indicates that it's unspecified.

fun allowDiskUse(allowDiskUse: Boolean?): CoroutineAggregatePublisher<T>

batchSize

Sets the number of documents to return per batch.

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

bypassDocumentValidation

Sets the bypass document level validation flag.

fun bypassDocumentValidation(bypassDocumentValidation: Boolean?): CoroutineAggregatePublisher<T>

collation

Sets the collation options

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

comment

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

fun comment(comment: String): CoroutineAggregatePublisher<T>

first

Helper to return a publisher limited to the first result.

suspend fun first(): T?

hint

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

fun hint(hint: Bson): CoroutineAggregatePublisher<T>

maxAwaitTime

The maximum amount of time for the server to wait on new documents to satisfy a $changeStream aggregation.

fun maxAwaitTime(maxAwaitTime: Long, timeUnit: TimeUnit): CoroutineAggregatePublisher<T>

maxTime

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

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

toCollection

Aggregates documents according to the specified aggregation pipeline, which must end with a $out stage.

suspend fun toCollection(): <ERROR CLASS>