MongoDB request DSL • opensavvy.ktmongo.dsl.aggregation.operators • TypeValueOperators • isNumber
isNumber¶
Determines if this value is a number.
The following types are considered numbers:
-
BsonType.Int32
-
BsonType.Int64
-
BsonType.Double
-
BsonType.Decimal128
Example¶
class User(
val data: String,
)
collection.aggregate()
.project {
Field.unsafe<Boolean>("dataIsNumber") set of(User::data).isNumber
}
External resources¶
See also¶
TypeValueOperators.type
Get a value's type.