devel branch recently saw a change that makes writing
some AQL queries a bit simpler.
The change introduces an optional shorthand notation for object attributes in the style of ES6’s enhanced object literal notation.
For example, consider the following query that groups values by
attribute and counts the number of documents per distinct
1 2 3
The object declaration in the last line of the query is somewhat redundant because one has to type identical attribute names and values:
In this case, the new shorthand notation simplifies the
In general, the shorthand notation can be used for all object literals when there is an attribute name that refers to a query variable of the same name.
It can also be mixed with the longer notation, e.g.: