sum

fun <TExpression> sum(property: KProperty<*>, expression: TExpression): BsonField

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

Return

the field @mongodb.driver.manual reference/operator/aggregation/sum/ $sum

Parameters

property

the data class property

expression

the expression

the expression type