Skip to content

MongoDB request DSLopensavvy.ktmongo.dsl.queryFilterQuerygteNotNull

gteNotNull

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

Selects documents for which this field has a value greater 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 gteNotNull 10
}

External resources

See also

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

Selects documents for which this field has a value greater 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 gteNotNull 10
}

External resources

See also