Muokkaa

Jaa


IS_NUMBER (NoSQL query)

APPLIES TO: NoSQL

Returns a boolean value indicating if the type of the specified expression is a number.

Syntax

IS_NUMBER(<expr>)  

Arguments

Description
expr Any expression.

Return types

Returns a boolean expression.

Examples

The following example various values to see if they're a number.

SELECT VALUE {
    isBooleanANumber: IS_NUMBER(true),
    isNumberANumber: IS_NUMBER(1),
    isStringANumber: IS_NUMBER("value"),
    isNullANumber: IS_NUMBER(null),
    isObjectANumber: IS_NUMBER({ "name": "Tecozow coat" }),
    isObjectStringPropertyANumber: IS_NUMBER({ "name": "Tecozow coat" }.name),
    isObjectNumberPropertyANumber: IS_NUMBER({ "quantity": 0 }.quantity),
    isUndefinedANumber: IS_NUMBER({}.category)
}
[
  {
    "isBooleanANumber": false,
    "isNumberANumber": true,
    "isStringANumber": false,
    "isNullANumber": false,
    "isObjectANumber": false,
    "isObjectStringPropertyANumber": false,
    "isObjectNumberPropertyANumber": true,
    "isUndefinedANumber": false
  }
]

Remarks