Share via


IS_NULL (query NoSQL)

SI APPLICA A: NoSQL

Restituisce un valore booleano che indica se il tipo dell'espressione specificata è null.

Sintassi

IS_NULL(<expr>)  

Argomenti

Descrizione
expr Qualsiasi espressione.

Tipi restituiti

Restituisce un'espressione booleana.

Esempio

L'esempio seguente controlla gli oggetti di vari tipi usando la funzione.

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

Commenti