type

@JvmName(name = "typeExt")
infix fun <T> KProperty<T?>.type(type: BsonType): Bson

Creates a filter that matches all documents where the value of the property is of the specified BSON type.

Return

the filter

Parameters

type

the BSON type


fun <T> type(property: KProperty<T?>, type: BsonType): Bson

Creates a filter that matches all documents where the value of the property is of the specified BSON type.

Return

the filter

Parameters

property

the data class property

type

the BSON type