AggregateFlow

interface AggregateFlow<out TResult : Any> : Flow<TResult>

Flow for aggregate.

Since

3.0

Parameters

The type of the result.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun allowDiskUse(allowDiskUse: Boolean?): AggregateFlow<TResult>

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

Link copied to clipboard
abstract fun batchSize(batchSize: Int): AggregateFlow<TResult>

Sets the number of documents to return per batch.

Link copied to clipboard
abstract fun bypassDocumentValidation(bypassDocumentValidation: Boolean?): AggregateFlow<TResult>

Sets the bypass document level validation flag.

Link copied to clipboard
abstract fun collation(collation: Collation?): AggregateFlow<TResult>

Sets the collation options

Link copied to clipboard
abstract suspend fun collect(collector: FlowCollector<TResult>)
Link copied to clipboard
abstract fun comment(comment: String?): AggregateFlow<TResult>

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

Link copied to clipboard
abstract suspend fun firstOrNull(): TResult?

Helper to return first result.

Link copied to clipboard
abstract fun hint(hint: Bson?): AggregateFlow<TResult>

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

Link copied to clipboard
abstract fun maxAwaitTime(maxAwaitTime: Long, timeUnit: TimeUnit): AggregateFlow<TResult>

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

Link copied to clipboard
abstract fun maxTime(maxTime: Long, timeUnit: TimeUnit): AggregateFlow<TResult>

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

Link copied to clipboard
abstract suspend fun toCollection()

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