max
Updates the value of a field to the specified value only if the specified value is greater than the current value of the field.
If the field doesn't exist, the field is set to the specified value.
Example
class User(
val name: String,
val score: Int,
)
collection.updateMany {
User::score max 100
}
Content copied to clipboard