Επεξεργασία

Κοινή χρήση μέσω


IS_NULL (NoSQL query)

APPLIES TO: NoSQL

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

Syntax

IS_NULL(<expr>)  

Arguments

Description
expr Any expression.

Return types

Returns a boolean expression.

Examples

The following example checks objects of various types using the function.

SELECT VALUE {
    booleanIsNull: IS_NULL(true),
    numberIsNull: IS_NULL(15),  
    stringIsNull: IS_NULL("AdventureWorks"),   
    nullIsNull: IS_NULL(null),  
    objectIsNull: IS_NULL({price: 85.23}),   
    arrayIsNull: IS_NULL(["red", "blue", "yellow"]),  
    populatedObjectPropertyIsNull: IS_NULL({quantity: 25, vendor: null}.quantity),
    invalidObjectPropertyIsNull: IS_NULL({quantity: 25, vendor: null}.size),
    nullObjectPropertyIsNull: IS_NULL({quantity: 25, vendor: null}.vendor)
}
[
  {
    "booleanIsNull": false,
    "numberIsNull": false,
    "stringIsNull": false,
    "nullIsNull": true,
    "objectIsNull": false,
    "arrayIsNull": false,
    "populatedObjectPropertyIsNull": false,
    "invalidObjectPropertyIsNull": false,
    "nullObjectPropertyIsNull": true
  }
]

Remarks