Skip to content

CoroutineMongoAggregationPipeline

An aggregation pipeline built on top of the official Kotlin driver.

To start a pipeline, call MongoCollection.aggregate.

External resources

Properties

context

Functions

asIterable

asIterable

Access the data of this pipeline as a MongoIterable.

The methods of MongoIterable are available directly on this type as extension methods, there is no need to convert to a MongoIterable yourself.

countTo

abstract override fun <Out : Any> countTo(field: Field<Out, Number>): CoroutineMongoAggregationPipeline<Out>
abstract override fun <Out : Any> countTo(field: KProperty1<Out, Number>): CoroutineMongoAggregationPipeline<Out>

embedInLookup

@LowLevelApi
abstract fun embedInLookup(writer: BsonFieldWriter)

embedInUnionWith

group

limit

abstract override fun limit(amount: Long): CoroutineMongoAggregationPipeline<Document>
abstract override fun limit(amount: Int): CoroutineMongoAggregationPipeline<Document>

lookup

match

abstract override fun match(filter: FilterQuery<Document>.() -> Unit): CoroutineMongoAggregationPipeline<Document>

matchExpr

project

reinterpret

sample

abstract override fun sample(size: Int): CoroutineMongoAggregationPipeline<Document>

set

skip

abstract override fun skip(amount: Long): CoroutineMongoAggregationPipeline<Document>
abstract override fun skip(amount: Int): CoroutineMongoAggregationPipeline<Document>

sort

toString

abstract override fun toString(): String

unionWith

unset

withStage

writeTo

@LowLevelApi
abstract fun writeTo(writer: BsonValueWriter)