Skip to content

MongoDB request DSLopensavvy.ktmongo.dsl.queryFilterQueryPredicategteNotNull

gteNotNull

open fun gteNotNull(value: T?)

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(18) }
}

External resources

See also