The latest update to the AQL Query Builder for JavaScript addresses a major pain point: the “prefix notation” or LISP style syntax of AQL operator methods. Instead of calling the operator methods on the query builder object itself, you can now directly call them as methods on value objects.

Let’s say you want to write a query that takes all non-admin users with a power level over 9000 and returns their score rounded to the closest 100. In plain AQL this could be written like this:

Trying to construct this query using the query builder would previously have resulted in code like this:

As of AQB 1.10.0, you can instead write the following:

Note that these changes are entirely cosmetic. Both queries translate to the same AQL and the old syntax is still supported. For more information on the AQL Query Builder for JavaScript see AQB on GitHub.

AQB 1.10.0 is available in the upcoming 2.6 release of ArangoDB and also in the latest development version. If you want to use the new features today you can install the latest version of AQB from NPM. AQB also works in the browser and on the server with Node.js or io.js using the official JavaScript driver for ArangoDB.