mirror of https://gitee.com/bigwinds/arangodb
35 lines
1.2 KiB
Plaintext
35 lines
1.2 KiB
Plaintext
!CHAPTER AQL with ArangoDB Web Interface
|
|
|
|
|
|
In the ArangoDB Web Interface the AQL Editor tab allows to execute ad-hoc AQL queries.
|
|
|
|
Type in a query in the main box and execute it by pressing the Execute button. The query result will be shown in another tab. The editor provides a few example queries that can be used as templates.
|
|
|
|
It also provides a feature to explain a query and inspect its execution plan ( with the *Explain* button).
|
|
|
|
Bind parameters can be defined in the lower box of the screen.
|
|
They are defined as JSON values, the same format that is used for bind parameters in the HTTP REST API and in (JavaScript) application code.
|
|
|
|
Here is an example:
|
|
|
|
```js
|
|
FOR doc IN @@collection
|
|
FILTER CONTAINS(LOWER(doc.author), @search, false)
|
|
RETURN { "name": doc.name, "descr": doc.description, "author": doc.author }
|
|
```
|
|
|
|
Bind parameter:
|
|
|
|
```js
|
|
{
|
|
"@collection": "_apps",
|
|
"search": "arango"
|
|
}
|
|
```
|
|
|
|
An overview of Bind Parameters may be found in [Aql Fundamentals](../Fundamentals/BindParameters.md).
|
|
|
|
Queries can also be saved in the AQL editor along with their bind parameter values for later reuse. This data is stored in the user profile in the current database (in the *_users* system table).
|
|
|
|
|