count

fun <T> KProperty<T>.count(): Bson

Creates a $count pipeline stage using the named field to store the result

Return

the $count pipeline stage

Parameters

field

the field in which to store the count


val KProperty<*>.count: BsonField

Gets a field name for a $group operation representing the count of the values of the given expression when applied to all members of the group.

Return

the field

Parameters

expression

the expression