1
0
Fork 0
arangodb/Documentation/Books/AQL/Functions
Heiko b6224c65bb Bug fix/geo optimization cleanup (#7637)
* docu geo

* cleanup, reuse of code

* Update Geo.md

Fix indention, improve links, fix description of GEO_MULTIPOLYGON() parameter.

* One array level can be omitted if the Polygon has no holes
2019-02-27 09:01:40 +01:00
..
Array.md add AQL function CONTAINS_ARRAY as alias for POSITION (#6242) 2018-08-24 12:50:50 +02:00
Date.md Bug fix/more sparsung (#6177) 2018-08-17 08:47:45 +02:00
Document.md Doc - Fix minor typo: "a" into "as" in (#6332) 2018-09-02 05:19:12 +02:00
Fulltext.md
Geo.md Bug fix/geo optimization cleanup (#7637) 2019-02-27 09:01:40 +01:00
Miscellaneous.md Doc - Improve description of CHECK_DOCUMENT() AQL function (#8003) 2019-02-17 23:53:20 +01:00
Numeric.md
README.md
String.md Doc - Forwardports to devel - 2018-12-27 (#7858) 2018-12-27 17:12:50 +01:00
TypeCast.md

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.