MapReduceFlow

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

Flow for map reduce.

Since

3.0

Parameters

The type of the result.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun action(action: MapReduceAction): MapReduceFlow<TResult>

Specify the MapReduceAction to be used when writing to a collection.

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

Sets the number of documents to return per batch.

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

Sets the bypass document level validation flag.

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

Sets the collation options

Link copied to clipboard
abstract suspend fun collect(collector: FlowCollector<TResult>)
Link copied to clipboard
abstract fun collectionName(collectionName: String): MapReduceFlow<TResult>

Sets the collectionName for the output of the MapReduce

Link copied to clipboard
abstract fun databaseName(databaseName: String?): MapReduceFlow<TResult>

Sets the name of the database to output into.

Link copied to clipboard
abstract fun filter(filter: Bson?): MapReduceFlow<TResult>

Sets the query filter to apply to the query.

Link copied to clipboard
abstract fun finalizeFunction(finalizeFunction: String?): MapReduceFlow<TResult>

Sets the JavaScript function that follows the reduce method and modifies the output.

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

Helper to return first result.

Link copied to clipboard
abstract fun jsMode(jsMode: Boolean): MapReduceFlow<TResult>

Sets the flag that specifies whether to convert intermediate data into BSON format between the execution of the map and reduce functions. Defaults to false.

Link copied to clipboard
abstract fun limit(limit: Int): MapReduceFlow<TResult>

Sets the limit to apply.

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

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

Link copied to clipboard
abstract fun nonAtomic(nonAtomic: Boolean): MapReduceFlow<TResult>

Sets if the post-processing step will prevent MongoDB from locking the database.

Link copied to clipboard
abstract fun scope(scope: Bson?): MapReduceFlow<TResult>

Sets the global variables that are accessible in the map, reduce and finalize functions.

Link copied to clipboard
abstract fun sharded(sharded: Boolean): MapReduceFlow<TResult>

Sets if the output database is sharded

Link copied to clipboard
abstract fun sort(sort: Bson?): MapReduceFlow<TResult>

Sets the sort criteria to apply to the query.

Link copied to clipboard
abstract suspend fun toCollection()

Aggregates documents to a collection according to the specified map-reduce function with the given options, which must specify a non-inline result.

Link copied to clipboard
abstract fun verbose(verbose: Boolean): MapReduceFlow<TResult>

Sets whether to include the timing information in the result information.