home shape

Using Bind Parameters in the AQL Editor: ArangoDB

The AQL editor in the web interface is useful for running ad hoc AQL queries and trying things out. It provides a feature to explain the query and inspect its execution plan. This can be used to check if the query uses indexes, and which.

So far the AQL editor only supported using query string literals, but it lacked support for bind parameters. Queries issued by application code however often will use bind parameters for security reasons. Often enough this prevented copying & pasting queries from the application code into the AQL editor and vice versa without making manual adjustments.

This has been fixed in the upcoming ArangoDB version 2.8 (currently in development). Bind parameters can now be used in the AQL editor as well. Bind parameters can be entered as JSON values, the same format that is used for bind parameters in the HTTP REST API and in (JavaScript) application code.

The queries can also be saved in the AQL editor along with their bind parameter values for later reuse.

Screenshot from the feature in 2.8:

bind-parameters

Jan Steemann

Jan Steemann

After more than 30 years of playing around with 8 bit computers, assembler and scripting languages, Jan decided to move on to work in database engineering. Jan is now a senior C/C++ developer with the ArangoDB core team, being there from version 0.1. He is mostly working on performance optimization, storage engines and the querying functionality. He also wrote most of AQL (ArangoDB’s query language).

Leave a Comment





Get the latest tutorials, blog posts and news: