type
Gets the BsonType of the current value.
Example
class User(
val name: String,
val age: Int,
)
collection.aggregate()
.project {
Field.unsafe<Boolean>("nameIsString") set (of(User::name).type eq of(BsonType.String))
}
Content copied to clipboard
External resources
See also
BsonType
List of possible types.