minus
open operator fun <Context : Any, Result> Value<Context, Result>.minus(other: Value<Context, Result>): Value<Context, Result>(source)
Subtracts one aggregation value from another.
The second argument is subtracted from the first argument.
Example
class Sale(
val price: Int,
val fee: Int,
val discount: Int,
val total: Int,
)
collection.updateManyWithPipeline {
set {
Sale::total set (of(Sale::price) + of(Sale::fee) - of(Sale::discount))
}
}
Content copied to clipboard