Number¶
object Number
A value of one of the numeric types: BsonType.Int32, BsonType.Int64, BsonType.Double or BsonType.Decimal128.
Example¶
class User(
val _id: ObjectId,
val age: Int,
)
users.find {
schema("User") {
properties {
property(User::_id) {
type(BsonType.ObjectId)
}
property(User::age) {
type(BsonType.Number)
}
}
}
}
See also¶
type: Specify a constraint on a value's type.