Type checking functions (Azure Cosmos DB)

APPLIES TO: NoSQL

The type-checking functions let you check the type of an expression within a SQL query. You can use type-checking functions to determine the types of properties within items on the fly, when they're variable or unknown.

Functions

The following functions support type checking against input values, and each return a Boolean value. The index usage column assumes, where applicable, that you're comparing the type checking functions to another value with an equality filter.

System function Index usage Index usage in queries with scalar aggregate functions Remarks
IS_ARRAY Full scan Full scan
IS_BOOL Index seek Index seek
IS_DEFINED Index seek Index seek
IS_NULL Index seek Index seek
IS_NUMBER Index seek Index seek
IS_OBJECT Full scan Full scan
IS_PRIMITIVE Index seek Index seek
IS_STRING Index seek Index seek

Next steps