IS_DEFINED (NoSQL query)
APPLIES TO:
NoSQL
Returns a boolean indicating if the property has been assigned a value.
Syntax
IS_DEFINED(<expr>)
Arguments
Description | |
---|---|
expr |
Any expression. |
Return types
Returns a boolean expression.
Examples
The following example checks for the presence of a property within the specified JSON document.
SELECT VALUE {
isDefined: IS_DEFINED({ "quantity" : 5 }.quantity),
isNotDefined: IS_DEFINED({ "quantity" : 5 }.name)
}
[
{
"isDefined": true,
"isNotDefined": false
}
]
Remarks
- This function benefits from a range index.
Related content
Povratne informacije
https://aka.ms/ContentUserFeedback.
Uskoro: tokom 2024. postepeno ćemo ukidati probleme s uslugom GitHub kao mehanizam povratnih informacija za sadržaj i zamijeniti ga novim sistemom povratnih informacija. Za više informacija, pogledajtePošalјite i prikažite povratne informacije za