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.
Stiže uskoro: Tijekom 2024. postupno ćemo ukinuti servis Problemi sa servisom GitHub kao mehanizam za povratne informacije za sadržaj i zamijeniti ga novim sustavom za povratne informacije. Dodatne informacije potražite u članku:Pošaljite i pogledajte povratne informacije za