1
0
Fork 0
arangodb/Documentation/Books/AQL/Functions
Simran 624008a20c
Doc - Correct AQL function examples (#8299)
2019-05-06 12:05:45 +02:00
..
Array.md Doc - Add cross-refs & better AQL function descriptions (#8242) 2019-03-13 08:49:12 +01:00
Date.md Bug fix/more sparsung (#6177) 2018-08-17 08:47:45 +02:00
Document.md Doc - Correct AQL function examples (#8299) 2019-05-06 12:05:45 +02:00
Fulltext.md Doc - Adds toc plugin (#4577) 2018-02-13 19:04:32 +01:00
Geo.md forward-port a PR from @Simran-B to devel 2019-04-15 15:44:26 +02:00
Miscellaneous.md added AQL function DECODE_REV (#8606) 2019-04-11 15:59:04 +02:00
Numeric.md Doc - Correct AQL function examples (#8299) 2019-05-06 12:05:45 +02:00
README.md Doc - Adds toc plugin (#4577) 2018-02-13 19:04:32 +01:00
String.md Doc - Correct AQL function examples (#8299) 2019-05-06 12:05:45 +02:00
TypeCast.md Doc - Add cross-refs & better AQL function descriptions (#8242) 2019-03-13 08:49:12 +01:00

README.md

Functions

AQL supports functions to allow more complex computations. Functions can be called at any query position where an expression is allowed. The general function call syntax is:

FUNCTIONNAME(arguments)

where FUNCTIONNAME is the name of the function to be called, and arguments is a comma-separated list of function arguments. If a function does not need any arguments, the argument list can be left empty. However, even if the argument list is empty the parentheses around it are still mandatory to make function calls distinguishable from variable names.

Some example function calls:

HAS(user, "name")
LENGTH(friends)
COLLECTIONS()

In contrast to collection and variable names, function names are case-insensitive, i.e. LENGTH(foo) and length(foo) are equivalent.

Extending AQL

It is possible to extend AQL with user-defined functions. These functions need to be written in JavaScript, and have to be registered before they can be used in a query. Please refer to Extending AQL for more details.