1
0
Fork 0
arangodb/Documentation/Books/AQL/Functions
Jan 5165155ed1 Bug fix/fixes 0609 (#3227)
* do not use V8 variant of AQL functions in early optimization stage when a C++ variant is available

* additionally, simplify AQL function definitions and aliases

* warn when more than 90% of max mappings are in use

* added C++ variant of replication catchup

* added `--log.role` option

* updated CHANGELOG

* removed non-existing scheduler.threads option from config

* removed useless __FILE__, __LINE__ invocations

* updated CHANGELOG

* allow a priority V8 context

* remove TRI_CORE_MEM_ZONE

* try to fix Windows errors & warnings

* cleanup

* removed memory zones altogether

* exclude system collections from collection tests
2017-09-13 16:28:21 +02:00
..
Array.md Feature/cpp aql char length (#2883) 2017-08-01 15:39:25 +02:00
Date.md rename .mdpp files to .md so the handling is easier. 2017-05-04 12:04:24 +02:00
Document.md rename .mdpp files to .md so the handling is easier. 2017-05-04 12:04:24 +02:00
Fulltext.md rename .mdpp files to .md so the handling is easier. 2017-05-04 12:04:24 +02:00
Geo.md Remove RocksDB note in Geo index docs (#3003) 2017-08-09 13:00:34 +02:00
Miscellaneous.md rename .mdpp files to .md so the handling is easier. 2017-05-04 12:04:24 +02:00
Numeric.md rename .mdpp files to .md so the handling is easier. 2017-05-04 12:04:24 +02:00
README.md rename .mdpp files to .md so the handling is easier. 2017-05-04 12:04:24 +02:00
String.md Bug fix/fixes 0609 (#3227) 2017-09-13 16:28:21 +02:00
TypeCast.md rename .mdpp files to .md so the handling is easier. 2017-05-04 12:04:24 +02: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.