Skip to content

MongoDB request DSLopensavvy.ktmongo.dsl.queryFilterQueryltNotNull

ltNotNull

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

Selects documents for which this field has a value strictly lesser than 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 ltNotNull 10
}

External resources

See also

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

Selects documents for which this field has a value strictly lesser than 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 ltNotNull 10
}

External resources

See also