mirror of https://gitee.com/bigwinds/arangodb
fix code block.
This commit is contained in:
parent
8f16458d8a
commit
35b6befccd
|
@ -40,16 +40,16 @@ It is also possible to use ES6 template strings for generating AQL queries. Ther
|
|||
a template string generator function named *aqlQuery*; we call it once to demonstrate
|
||||
its result, and once putting it directly into the query:
|
||||
|
||||
```js
|
||||
var key = 'testKey';
|
||||
aqlQuery`FOR c IN mycollection FILTER c._key == ${key} RETURN c._key`;
|
||||
{
|
||||
"query" : "FOR c IN mycollection FILTER c._key == @value0 RETURN c._key",
|
||||
"bindVars" : {
|
||||
"value0" : "testKey"
|
||||
}
|
||||
}
|
||||
```
|
||||
```js
|
||||
var key = 'testKey';
|
||||
aqlQuery`FOR c IN mycollection FILTER c._key == ${key} RETURN c._key`;
|
||||
{
|
||||
"query" : "FOR c IN mycollection FILTER c._key == @value0 RETURN c._key",
|
||||
"bindVars" : {
|
||||
"value0" : "testKey"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@startDocuBlockInline 02_workWithAQL_aqlQuery
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{02_workWithAQL_aqlQuery}
|
||||
|
|
Loading…
Reference in New Issue