kmongo / org.litote.kmongo / kotlin.reflect.KProperty / exists

exists

fun <T> KProperty<T>.exists(): Bson (source)

Creates a filter that matches all documents that contain the given property.

Return
the filter

Mongodb
.driver.manual reference/operator/query/exists $exists

infix fun <T> KProperty<T>.exists(exists: Boolean): Bson (source)

Creates a filter that matches all documents that either contain or do not contain the given property, depending on the value of the exists parameter.

Parameters

exists - true to check for existence, false to check for absence

Return
the filter

Mongodb
.driver.manual reference/operator/query/exists $exists