Skip to content

MongoDB request DSLopensavvy.ktmongo.dsl.aggregation.stagesHasCount

HasCount

Pipeline implementing the $count stage.

Inheritors

Properties

context

abstract val context: 

The context used to generate this pipeline.

Functions

countTo

Counts how many elements exist in the pipeline and outputs a single document containing a single field containing the count.

open fun <Output : Any> countTo(field: Field<Output, Number>): Pipeline<Output>

Counts how many elements exist in the pipeline and outputs a single document containing a single field containing the count.

reinterpret

abstract fun <New : Any> reinterpret(): Pipeline<New>

Changes the type of the returned document, with no type-safety.

toString

abstract override fun toString(): String

JSON representation of this pipeline.

withStage

abstract fun withStage(stage: BsonNode): Pipeline<Document>

Creates a new pipeline that expands on the current one by adding stage.

writeTo

abstract fun writeTo(writer: )

Writes the entire pipeline into writer.