MongoDB request DSL • opensavvy.ktmongo.dsl.query • FilterQuery • hasType
hasType¶
Selects documents where the value of the field is an instance of the specified BSON type.
Querying by data type is useful when dealing with highly unstructured data where data types are not predictable.
Example¶
External resources¶
See also¶
-
FilterQuery.isNullChecks if a value has the type BsonType.Null. -
FilterQuery.isUndefinedChecks if a value has the type BsonType.Undefined.
open infix fun KProperty1<T, *>.hasType(type: ERROR CLASS: Symbol not found for BsonType)
Selects documents where the value of the field is an instance of the specified BSON type.
Querying by data type is useful when dealing with highly unstructured data where data types are not predictable.
Example¶
External resources¶
See also¶
-
FilterQuery.isNullChecks if a value has the type BsonType.Null. -
FilterQuery.isUndefinedChecks if a value has the type BsonType.Undefined.