Skip to content

SyncMongoAggregationPipeline

interface SyncMongoAggregationPipeline<Document : Any> : MongoAggregationPipeline<Document> 

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>): SyncMongoAggregationPipeline<Out>
abstract override fun <Out : Any> countTo(field: KProperty1<Out, Number>): SyncMongoAggregationPipeline<Out>

embedInLookup

@LowLevelApi
abstract fun embedInLookup(writer: BsonFieldWriter)

embedInUnionWith

group

abstract override fun <Out : Any> group(block: AccumulationOperators<Document, Out>.() -> Unit): SyncMongoAggregationPipeline<Out>

limit

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

lookup

match

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

matchExpr

project

reinterpret

sample

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

set

abstract override fun set(block: SetStageOperators<Document>.() -> Unit): SyncMongoAggregationPipeline<Document>

skip

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

sort

abstract override fun sort(block: SortOptionDsl<Document>.() -> Unit): SyncMongoAggregationPipeline<Document>

toString

abstract override fun toString(): String

unionWith

unset

withStage

writeTo

@LowLevelApi
abstract fun writeTo(writer: BsonValueWriter)