mod
Selects documents where the value of the field divided by divisor has the specified remainder.
If the value of the field is a floating-point number, it is rounded towards zero before the operation.
Example
To find all users with an odd score:
class User(
val name: String,
val age: Int?,
)
collection.find {
User::age.mod(2, 1)
}Content copied to clipboard
This request returns elements where age % 2 == 1.