mod

@JvmName(name = "modExt")
fun <T> KProperty<T?>.mod(divisor: Long, remainder: Long): Bson

Creates a filter that matches all documents where the value of a property divided by a divisor has the specified remainder (i.e. perform a modulo operation to select documents).

Return

the filter

Parameters

divisor

the modulus

remainder

the remainder


fun <T> mod(property: KProperty<T?>, divisor: Long, remainder: Long): Bson

Creates a filter that matches all documents where the value of a property divided by a divisor has the specified remainder (i.e. perform a modulo operation to select documents).

Return

the filter

Parameters

property

the data class property

divisor

the modulus

remainder

the remainder