kmongo / org.litote.kmongo.coroutine / aggregate

aggregate

fun <reified T : Any> CoroutineCollection<*>.aggregate(vararg pipeline: String): CoroutineAggregatePublisher<T> (source)
fun <reified T : Any> CoroutineCollection<*>.aggregate(vararg pipeline: Bson): CoroutineAggregatePublisher<T> (source)

Aggregates documents according to the specified aggregation pipeline. If the pipeline ends with a $out stage, the returned iterable will be a query of the collection that the aggregation was written to. Note that in this case the pipeline will be executed even if the iterable is never iterated.

Parameters

pipeline - the aggregate pipeline

Parameters