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.
exists
- true to check for existence, false to check for absence
Return
the filter
Mongodb
.driver.manual reference/operator/query/exists $exists