Skip to content

MongoDB request DSLopensavvy.ktmongo.dsl.queryFilterQuerylteNotNull

lteNotNull

open infix fun <V> Field<T, V>.lteNotNull(value: V?)

Selects documents for which this field has a value lesser or equal to value.

If value is null, the operator is not added (all elements are matched).

Example

class User(
    val name: String,
    val age: Int?
)

collection.find {
    User::age lteNotNull 10
}

External resources

See also

open infix fun <V> KProperty1<T, V>.lteNotNull(value: V?)

Selects documents for which this field has a value lesser or equal to value.

If value is null, the operator is not added (all elements are matched).

Example

class User(
    val name: String,
    val age: Int?
)

collection.find {
    User::age lteNotNull 10
}

External resources

See also