aggregate

@JvmName(name = "aggregateAsT")
fun aggregate(pipeline: List<Bson>): AggregateFlow<T>

Aggregates documents according to the specified aggregation pipeline.

Return

an iterable containing the result of the aggregation operation

Parameters

pipeline

the aggregation pipeline

See also


inline fun <R : Any> aggregate(pipeline: List<Bson>): AggregateFlow<R>

Aggregates documents according to the specified aggregation pipeline.

Return

an iterable containing the result of the aggregation operation

Parameters

R

the class to decode each document into

pipeline

the aggregation pipeline

See also


@JvmName(name = "aggregateAsTWithSession")
fun aggregate(clientSession: ClientSession, pipeline: List<Bson>): AggregateFlow<T>

Aggregates documents according to the specified aggregation pipeline.

Return

an iterable containing the result of the aggregation operation

Parameters

clientSession

the client session with which to associate this operation

pipeline

the aggregation pipeline

See also


inline fun <R : Any> aggregate(clientSession: ClientSession, pipeline: List<Bson>): AggregateFlow<R>

Aggregates documents according to the specified aggregation pipeline.

Return

an iterable containing the result of the aggregation operation

Parameters

R

the class to decode each document into

clientSession

the client session with which to associate this operation

pipeline

the aggregation pipeline

See also


fun <R : Any> aggregate(pipeline: List<Bson>, resultClass: Class<R>): AggregateFlow<R>

Aggregates documents according to the specified aggregation pipeline.

Return

an iterable containing the result of the aggregation operation

Parameters

R

the class to decode each document into

pipeline

the aggregation pipeline

resultClass

the target document type of the iterable.

See also


fun <R : Any> aggregate(clientSession: ClientSession, pipeline: List<Bson>, resultClass: Class<R>): AggregateFlow<R>

Aggregates documents according to the specified aggregation pipeline.

Return

an iterable containing the result of the aggregation operation

Parameters

R

the class to decode each document into

clientSession

the client session with which to associate this operation

pipeline

the aggregation pipeline

resultClass

the target document type of the iterable.

See also