Aggregation Pipeline
Fluent interface for building MongoDB aggregation pipelines.
Each operation returns a new pipeline instance (immutable pattern).
Inheritors
Functions
Link copied to clipboard
Performs add fields operations
Link copied to clipboard
abstract fun customStage(stageName: String, block: CustomStageBuilder.() -> Unit): AggregationPipeline<T>
For building custom stages
Link copied to clipboard
Execute pipeline and return first result or null.
Link copied to clipboard
abstract fun <R : Any> group(resultType: KClass<R>, block: GroupBuilder<T>.() -> Unit): AggregationPipeline<R>
Perform grouping operations in pipeline
Link copied to clipboard
Limit to N documents ($limit stage).
Link copied to clipboard
Filter documents ($match stage).
Link copied to clipboard
Paginate result of previous stages output
Link copied to clipboard
Skip N documents ($skip stage).
Link copied to clipboard
Sort documents ($sort stage).
Link copied to clipboard
Get raw Spring Data Aggregation for debugging.