1
0
Fork 0
arangodb/Documentation/Books/AQL/Functions
Simran Brucherseifer 0d9dbfbe24 Docs: AQL functions and index utilization 2016-11-14 14:16:30 +01:00
..
Array.mdpp Link CONCAT and CONCAT_SEPARATOR functions 2016-09-13 14:49:55 +02:00
Date.mdpp Documentation corrections (mostly AQL) 2016-05-24 18:46:02 +02:00
Document.mdpp Try to circumvent markdown parser quirks 2016-09-13 14:49:55 +02:00
Fulltext.mdpp Docs: AQL functions and index utilization 2016-11-14 14:16:30 +01:00
Geo.mdpp Docs: AQL functions and index utilization 2016-11-14 14:16:30 +01:00
Miscellaneous.mdpp Docs: Data model -> Data models, note that NOT_NULL() is equal to SQL's COALESCE() 2016-08-11 19:49:00 +02:00
Numeric.mdpp Add COUNT() and RANGE() to documentation, some improvements 2016-06-03 19:03:36 +02:00
README.mdpp Docs: more AQL UDF, note about indexes and HAS() / IS_NULL() 2016-08-04 21:26:57 +02:00
String.mdpp added missing functions 2016-10-20 11:48:46 +02:00
TypeCast.mdpp Docs: more AQL UDF, note about indexes and HAS() / IS_NULL() 2016-08-04 21:26:57 +02:00

README.mdpp

!CHAPTER 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:

```js
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:

```js
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.

!SUBSECTION 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](../Extending/index.html) for more details.