exists

@JvmName(name = "existsExt")
fun <T> KProperty<T?>.exists(): Bson

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

Return

the filter


fun <T> exists(property: KProperty<T?>): Bson

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

Return

the filter

Parameters

property

the data class property


@JvmName(name = "existsExt")
infix fun <T> KProperty<T?>.exists(exists: Boolean): Bson

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.

Return

the filter

Parameters

exists

true to check for existence, false to check for absence


fun <T> exists(property: KProperty<T?>, exists: Boolean): Bson

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.

Return

the filter

Parameters

property

the data class property

exists

true to check for existence, false to check for absence