Using AQL, is there a good way to get fields from a single document only if
it exists?
E.g. say I've got a query like:
LET d = DOCUMENT("myCollection", "123")
RETURN { "name": d.name, "age": d.age }
If the document doesn't exist in the collection, this returns:
[
{
"name": null,
"size": null
}
]
However, this doesn't distinguish it from the case where the document does
exist in the collection, but has both its fields set to null.
Is there a way of changing the above query so that the result is instead
either just [] or null if the document isn't found? Or would I need to use
two separate queries (one to check existence, then one to fetch the data if
it does exist)?
--
You received this message because you are subscribed to the Google Groups
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/arangodb/76bbce4b-8a16-4971-b9db-bf206ac0fb6a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.