IS_NULL (consulta NoSQL)

APLICA-SE A: NoSQL

Devolve um valor booleano que indica se o tipo da expressão especificada é null.

Sintaxe

IS_NULL(<expr>)  

Argumentos

Description
expr Qualquer expressão.

Tipos de devolução

Devolve uma expressão booleana.

Exemplos

O exemplo seguinte verifica objetos de vários tipos com a função.

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
  }
]

Observações