Breyta

Deila með


IS_STRING (NoSQL query)

APPLIES TO: NoSQL

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

Syntax

IS_STRING(<expr>)  

Arguments

Description
expr Any expression.

Return types

Returns a boolean expression.

Examples

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

SELECT VALUE {
    isBooleanAString: IS_STRING(true),
    isNumberAString: IS_STRING(1),
    isStringAString: IS_STRING("value"),
    isArrayAString: IS_STRING([ "green", "red", "yellow" ]),
    isNullAString: IS_STRING(null),
    isObjectAString: IS_STRING({ "name": "Tecozow coat" }),
    isObjectStringPropertyAString: IS_STRING({ "name": "Tecozow coat" }.name),
    isObjectBooleanPropertyAString: IS_STRING({ "onSale": false }.onSale),
    isUndefinedAString: IS_STRING({}.category)
}
[
  {
    "isBooleanAString": false,
    "isNumberAString": false,
    "isStringAString": true,
    "isArrayAString": false,
    "isNullAString": false,
    "isObjectAString": false,
    "isObjectStringPropertyAString": true,
    "isObjectBooleanPropertyAString": false,
    "isUndefinedAString": false
  }
]

Remarks