You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -700,8 +700,8 @@ var db = require('arangojs')();
700
700
var active =true;
701
701
702
702
// Using ES2015 string templates
703
-
varaqlQuery=require('arangojs').aqlQuery;
704
-
db.query(aqlQuery`
703
+
varaql=require('arangojs').aql;
704
+
db.query(aql`
705
705
FOR u IN _users
706
706
FILTER u.authData.active == ${active}
707
707
RETURN u.user
@@ -738,9 +738,9 @@ db.query(
738
738
});
739
739
```
740
740
741
-
#### aqlQuery
741
+
#### aql
742
742
743
-
`aqlQuery(strings, ...args):Object`
743
+
`aql(strings, ...args):Object`
744
744
745
745
Template string handler for AQL queries. Converts an ES2015 template string to an object that can be passed to `database.query` by converting arguments to bind variables.
746
746
@@ -750,10 +750,10 @@ Any *Collection* instances will automatically be converted to collection bind va
750
750
751
751
```js
752
752
var db =require('arangojs')();
753
-
varaqlQuery=require('arangojs').aqlQuery;
753
+
varaql=require('arangojs').aql;
754
754
var userCollection =db.collection('_users');
755
755
var role ='admin';
756
-
db.query(aqlQuery`
756
+
db.query(aql`
757
757
FOR user IN ${userCollection}
758
758
FILTER user.role == ${role}
759
759
RETURN user
@@ -811,15 +811,15 @@ Creates an AQL user function with the given *name* and *code* if it does not alr
811
811
812
812
```js
813
813
var db =require('arangojs')();
814
-
varaqlQuery=require('arangojs').aqlQuery;
814
+
varaql=require('arangojs').aql;
815
815
db.createFunction(
816
816
'ACME::ACCOUNTING::CALCULATE_VAT',
817
817
String(function (price) {
818
818
return price *0.19;
819
819
})
820
820
)
821
821
// Use the new function in an AQL query with template handler:
0 commit comments