Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion site/content/3.12/aql/common-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ of an AQL query string.

## String concatenation

In AQL, strings must be concatenated using the [CONCAT()](functions/string.md#concat)
In AQL, strings must be concatenated using the [`CONCAT()`](functions/string.md#concat)
function. Joining them together with the `+` operator is not supported. Especially
as JavaScript programmer it is easy to walk into this trap:

Expand Down
6 changes: 3 additions & 3 deletions site/content/3.12/aql/examples-and-query-patterns/counting.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ description: >-
## Amount of documents in a collection

To return the count of documents that currently exist in a collection,
you can call the [LENGTH() function](../functions/array.md#length):
you can call the [`LENGTH()` function](../functions/array.md#length):

```aql
RETURN LENGTH(collection)
```

This type of call is optimized since 2.8 (no unnecessary intermediate result
is built up in memory) and it is therefore the preferred way to determine the count.
Internally, [COLLECTION_COUNT()](../functions/miscellaneous.md#collection_count) is called.
Internally, [`COLLECTION_COUNT()`](../functions/miscellaneous.md#collection_count) is called.

In earlier versions with `COLLECT ... WITH COUNT INTO` available (since 2.4),
you may use the following code instead of *LENGTH()* for better performance:
you may use the following code instead of `LENGTH()` for better performance:

```aql
FOR doc IN collection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ The results of the subquery are then made available to the main query and will
be returned. But the attribute names in the result are still `name` and `value`,
so we're not there yet.

So let us also employ AQL's [ZIP()](../functions/document-object.md#zip) function,
So let us also employ AQL's [`ZIP()`](../functions/document-object.md#zip) function,
which can create an object from two arrays:

- the first parameter to `ZIP()` is an array with the attribute names
Expand Down
10 changes: 5 additions & 5 deletions site/content/3.12/aql/functions/arangosearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ enabled. The `PHRASE()` function will otherwise not find anything.
#### Object tokens

- `{IN_RANGE: [low, high, includeLow, includeHigh]}`:
see [IN_RANGE()](#in_range). *low* and *high* can only be strings.
see [`IN_RANGE()`](#in_range). *low* and *high* can only be strings.
- `{LEVENSHTEIN_MATCH: [token, maxDistance, transpositions, maxTerms, prefix]}`:
- `token` (string): a string to search
- `maxDistance` (number): maximum Levenshtein / Damerau-Levenshtein distance
Expand All @@ -621,14 +621,14 @@ enabled. The `PHRASE()` function will otherwise not find anything.
remainders of the strings. This option can improve performance in cases where
there is a known common prefix. The default value is an empty string
(introduced in v3.7.13, v3.8.1).
- `{STARTS_WITH: [prefix]}`: see [STARTS_WITH()](#starts_with).
- `{STARTS_WITH: [prefix]}`: see [`STARTS_WITH()`](#starts_with).
Array brackets are optional
- `{TERM: [token]}`: equal to `token` but without Analyzer tokenization.
Array brackets are optional
- `{TERMS: [token1, ..., tokenN]}`: one of `token1, ..., tokenN` can be found
in specified position. Inside an array the object syntax can be replaced with
the object field value, e.g., `[..., [token1, ..., tokenN], ...]`.
- `{WILDCARD: [token]}`: see [LIKE()](#like).
- `{WILDCARD: [token]}`: see [`LIKE()`](#like).
Array brackets are optional

An array token inside an array can be used in the `TERMS` case only.
Expand Down Expand Up @@ -906,7 +906,7 @@ Match documents with a [Damerau-Levenshtein distance](https://en.wikipedia.org/w
lower than or equal to `distance` between the stored attribute value and
`target`. It can optionally match documents using a pure Levenshtein distance.

See [LEVENSHTEIN_DISTANCE()](string.md#levenshtein_distance)
See [`LEVENSHTEIN_DISTANCE()`](string.md#levenshtein_distance)
if you want to calculate the edit distance of two strings.

- **path** (attribute path expression\|string): the path of the attribute to
Expand Down Expand Up @@ -1323,7 +1323,7 @@ _n_-grams for search highlighting purposes.
attributes:
- **name** (array): the attribute and array element path as an array of
strings and numbers. You can pass this name to the
[VALUE()](document-object.md) to dynamically look up the value.
[`VALUE()`](document-object.md) to dynamically look up the value.
- **offsets** (array): an array of arrays with the matched positions, capped
to the specified limits. Each inner array has two elements with the start
offset and the length of a match.
Expand Down
61 changes: 28 additions & 33 deletions site/content/3.12/aql/functions/array.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Add all elements of an array to another array. All values are added at the end o
array (right side).

It can also be used to append a single element to an array. It is not necessary to wrap
it in an array (unless it is an array itself). You may also use [PUSH()](#push) instead.
it in an array (unless it is an array itself). You may also use [`PUSH()`](#push) instead.

- **anyArray** (array): array with elements of arbitrary type
- **values** (array\|any): array, whose elements shall be added to `anyArray`
Expand Down Expand Up @@ -211,9 +211,8 @@ FOR v, e, p IN 1..3 OUTBOUND 'places/Toronto' GRAPH 'kShortestPathsGraph'
Return the intersection of all arrays specified. The result is an array of values that
occur in all arguments.

Other set operations are [UNION()](#union),
[MINUS()](#minus) and
[OUTERSECTION()](#outersection).
Other set operations are [`UNION()`](#union), [`MINUS()`](#minus) and
[`OUTERSECTION()`](#outersection).

- **arrays** (array, *repeatable*): an arbitrary number of arrays as multiple arguments
(at least 2)
Expand Down Expand Up @@ -320,7 +319,7 @@ Determine the number of elements in an array.
- **anyArray** (array): array with elements of arbitrary type
- returns **length** (number): the number of array elements in *anyArray*.

*LENGTH()* can also determine the [number of attribute keys](document-object.md#length)
`LENGTH()` can also determine the [number of attribute keys](document-object.md#length)
of an object / document, the [amount of documents](miscellaneous.md#length) in a
collection and the [character length](string.md#length) of a string.

Expand Down Expand Up @@ -382,9 +381,8 @@ RETURN LENGTH( {a:1, b:2, c:3, d:4, e:{f:5,g:6}} )

Return the difference of all arrays specified.

Other set operations are [UNION()](#union),
[INTERSECTION()](#intersection) and
[OUTERSECTION()](#outersection).
Other set operations are [`UNION()`](#union), [`INTERSECTION()`](#intersection)
and [`OUTERSECTION()`](#outersection).

- **arrays** (array, *repeatable*): an arbitrary number of arrays as multiple
arguments (at least 2)
Expand Down Expand Up @@ -447,9 +445,8 @@ RETURN NTH( [ "foo", "bar", "baz" ], -1 )

Return the values that occur only once across all arrays specified.

Other set operations are [UNION()](#union),
[MINUS()](#minus) and
[INTERSECTION()](#intersection).
Other set operations are [`UNION()`](#union), [`MINUS()`](#minus) and
[`INTERSECTION()`](#intersection).

- **arrays** (array, *repeatable*): an arbitrary number of arrays as multiple arguments
(at least 2)
Expand All @@ -472,9 +469,9 @@ RETURN OUTERSECTION( [ 1, 2, 3 ], [ 2, 3, 4 ], [ 3, 4, 5 ] )

Remove the last element of *array*.

To append an element (right side), see [PUSH()](#push).\
To remove the first element, see [SHIFT()](#shift).\
To remove an element at an arbitrary position, see [REMOVE_NTH()](#remove_nth).
To append an element (right side), see [`PUSH()`](#push).\
To remove the first element, see [`SHIFT()`](#shift).\
To remove an element at an arbitrary position, see [`REMOVE_NTH()`](#remove_nth).

- **anyArray** (array): an array with elements of arbitrary type
- returns **newArray** (array): *anyArray* without the last element. If it's already
Expand Down Expand Up @@ -517,7 +514,7 @@ the [`IN` operator](../operators.md#comparison-operators), for example,
`3 IN [1, 2, 3]` instead of `POSITION([1, 2, 3], 3)`.

To determine if or at which position a string occurs in another string, see the
[CONTAINS() string function](string.md#contains).
[`CONTAINS()` string function](string.md#contains).

**Examples**

Expand Down Expand Up @@ -566,9 +563,9 @@ existence, you may use the `IN` operator instead of calling `POSITION()`, like

Append *value* to *anyArray* (right side).

To remove the last element, see [POP()](#pop).\
To prepend a value (left side), see [UNSHIFT()](#unshift).\
To append multiple elements, see [APPEND()](#append).
To remove the last element, see [`POP()`](#pop).\
To prepend a value (left side), see [`UNSHIFT()`](#unshift).\
To append multiple elements, see [`APPEND()`](#append).

- **anyArray** (array): array with elements of arbitrary type
- **value** (any): an element of arbitrary type
Expand All @@ -579,7 +576,7 @@ To append multiple elements, see [APPEND()](#append).

Note: The *unique* flag only controls if *value* is added if it's already present
in *anyArray*. Duplicate elements that already exist in *anyArray* will not be
removed. To make an array unique, use the [UNIQUE()](#unique) function.
removed. To make an array unique, use the [`UNIQUE()`](#unique) function.

**Examples**

Expand All @@ -605,8 +602,8 @@ RETURN PUSH([ 1, 2, 2, 3 ], 2, true)

Remove the element at *position* from the *anyArray*.

To remove the first element, see [SHIFT()](#shift).\
To remove the last element, see [POP()](#pop).
To remove the first element, see [`SHIFT()`](#shift).\
To remove the last element, see [`POP()`](#pop).

- **anyArray** (array): array with elements of arbitrary type
- **position** (number): the position of the element to remove. Positions start
Expand Down Expand Up @@ -785,9 +782,9 @@ RETURN REVERSE ( [2,4,6,8,10] )

Remove the first element of *anyArray*.

To prepend an element (left side), see [UNSHIFT()](#unshift).\
To remove the last element, see [POP()](#pop).\
To remove an element at an arbitrary position, see [REMOVE_NTH()](#remove_nth).
To prepend an element (left side), see [`UNSHIFT()`](#unshift).\
To remove the last element, see [`POP()`](#pop).\
To remove an element at an arbitrary position, see [`REMOVE_NTH()`](#remove_nth).

- **anyArray** (array): array with elements with arbitrary type
- returns **newArray** (array): *anyArray* without the left-most element. If *anyArray*
Expand Down Expand Up @@ -923,9 +920,8 @@ RETURN SORTED_UNIQUE( [ 8,4,2,10,6,2,8,6,4 ] )

Return the union of all arrays specified.

Other set operations are [MINUS()](#minus),
[INTERSECTION()](#intersection) and
[OUTERSECTION()](#outersection).
Other set operations are [`MINUS()`](#minus), [`INTERSECTION()`](#intersection)
and [`OUTERSECTION()`](#outersection).

- **arrays** (array, *repeatable*): an arbitrary number of arrays as multiple
arguments (at least 2)
Expand All @@ -946,9 +942,8 @@ RETURN UNION(
```

Note: No duplicates will be removed. In order to remove duplicates, please use
either [UNION_DISTINCT()](#union_distinct)
or apply [UNIQUE()](#unique) on the
result of *UNION()*:
either [`UNION_DISTINCT()`](#union_distinct) or apply [`UNIQUE()`](#unique) on the
result of `UNION()`:

```aql
---
Expand Down Expand Up @@ -1013,8 +1008,8 @@ RETURN UNIQUE( [ 1,2,2,3,3,3,4,4,4,4,5,5,5,5,5 ] )

Prepend *value* to *anyArray* (left side).

To remove the first element, see [SHIFT()](#shift).\
To append a value (right side), see [PUSH()](#push).
To remove the first element, see [`SHIFT()`](#shift).\
To append a value (right side), see [`PUSH()`](#push).

- **anyArray** (array): array with elements of arbitrary type
- **value** (any): an element of arbitrary type
Expand All @@ -1025,7 +1020,7 @@ To append a value (right side), see [PUSH()](#push).

Note: The *unique* flag only controls if *value* is added if it's already present
in *anyArray*. Duplicate elements that already exist in *anyArray* will not be
removed. To make an array unique, use the [UNIQUE()](#unique) function.
removed. To make an array unique, use the [`UNIQUE()`](#unique) function.

**Examples**

Expand Down
4 changes: 2 additions & 2 deletions site/content/3.12/aql/functions/bit.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ BIT_DECONSTRUCT(2147484675) // [0, 1, 10, 31]

Converts a bitstring (consisting of digits `0` and `1`) into a number.

To convert a number into a bitstring, see [BIT_TO_STRING()](#bit_to_string).
To convert a number into a bitstring, see [`BIT_TO_STRING()`](#bit_to_string).

- **bitstring** (string): string sequence consisting of `0` and `1` characters
- returns **number** (number\|null): the parsed number
Expand Down Expand Up @@ -269,7 +269,7 @@ BIT_TEST(255, 8) // false

Converts a numeric input value into a bitstring, consisting of `0` and `1`.

To convert a bitstring into a number, see [BIT_FROM_STRING()](#bit_from_string).
To convert a bitstring into a number, see [`BIT_FROM_STRING()`](#bit_from_string).

- **number** (number): the number to stringify
- returns **bitstring** (string\|null): bitstring generated from the input value
Expand Down
8 changes: 4 additions & 4 deletions site/content/3.12/aql/functions/date.md
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,7 @@ Add `amount` given in `unit` to `date` and return the calculated date.
- **date** (number\|string): numeric timestamp or ISO 8601 date time string
- **amount** (number\|string): number of `unit`s to add (positive value) or
subtract (negative value). It is recommended to use positive values only,
and use [DATE_SUBTRACT()](#date_subtract) for subtractions instead.
and use [`DATE_SUBTRACT()`](#date_subtract) for subtractions instead.
- **unit** (string): either of the following to specify the time unit to add or
subtract (case-insensitive):
- `"y"`, `"year"`, `"years"`
Expand Down Expand Up @@ -1161,15 +1161,15 @@ DATE_ADD("2000-01-01", "P1Y2M3W4DT5H6M7.89S") // add a bit of everything

Subtract `amount` given in `unit` from `date` and return the calculated date.

It works the same as [DATE_ADD()](#date_add), except that it subtracts. It is
It works the same as [`DATE_ADD()`](#date_add), except that it subtracts. It is
equivalent to calling `DATE_ADD()` with a negative amount, except that
`DATE_SUBTRACT()` can also subtract ISO durations. Note that negative ISO
durations are not supported (i.e. starting with `-P`, like `-P1Y`).

- **date** (number\|string): numeric timestamp or ISO 8601 date time string
- **amount** (number\|string): number of `unit`s to subtract (positive value) or
add (negative value). It is recommended to use positive values only,
and use [DATE_ADD()](#date_add) for additions instead.
and use [`DATE_ADD()`](#date_add) for additions instead.
- **unit** (string): either of the following to specify the time unit to add or
subtract (case-insensitive):
- `"y"`, `"year"`, `"years"`
Expand Down Expand Up @@ -1374,7 +1374,7 @@ with are "ignored". The query returns every document with `date` ranging from
`2015-05-15T00:00:00.000Z` to `2015-05-15T23:99:99.999Z`. It would also include
`2015-05-15T24:00:00.000Z`, but that date is actually `2015-05-16T00:00:00.000Z`
and can only occur if inserted manually (you may want to pass dates through
[DATE_ISO8601()](#date_iso8601) to ensure a correct date representation).
[`DATE_ISO8601()`](#date_iso8601) to ensure a correct date representation).

Leap days in leap years (29th of February) must be always handled manually,
if you require so (e.g. birthday checks):
Expand Down
12 changes: 6 additions & 6 deletions site/content/3.12/aql/functions/document-object.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ RETURN [
Keep only the attributes `attributeName` to `attributeNameN` of `document`.
All other attributes will be removed from the result.

To do the opposite, see [UNSET()](#unset).
To do the opposite, see [`UNSET()`](#unset).

- **document** (object): a document / object
- **attributeNames** (string, *repeatable*): an arbitrary number of attribute
Expand Down Expand Up @@ -272,7 +272,7 @@ RETURN KEEP(doc, ["foo", "baz"])
Recursively preserve the attributes `attributeName1` to `attributeNameN` from
`document` and its sub-documents. All other attributes will be removed.

To do the opposite, use [UNSET_RECURSIVE()](#unset_recursive).
To do the opposite, use [`UNSET_RECURSIVE()`](#unset_recursive).

- **document** (object): a document / object
- **attributeNames** (string, *repeatable*): an arbitrary number of attribute
Expand Down Expand Up @@ -415,7 +415,7 @@ with any number of attributes each.

An attribute value of `null` will match documents with an explicit attribute value
of `null` as well as documents with this attribute missing (implicitly `null`).
Only [HAS()](#has) can differentiate between an attribute being absent and having
Only [`HAS()`](#has) can differentiate between an attribute being absent and having
a stored `null` value.

An empty object `{}` will match all documents. Be careful not to ask for all
Expand Down Expand Up @@ -485,7 +485,7 @@ If document attribute keys are ambiguous, the merged result will contain the val
of the documents contained later in the argument list.

Note that merging will only be done for top-level attributes. If you wish to
merge sub-attributes, use [MERGE_RECURSIVE()](#merge_recursive) instead.
merge sub-attributes, use [`MERGE_RECURSIVE()`](#merge_recursive) instead.

- **documents** (object, *repeatable*): an arbitrary number of documents as
multiple arguments (at least 2)
Expand Down Expand Up @@ -801,7 +801,7 @@ RETURN TRANSLATE(42, { "42": true } )
Remove the attributes `attributeName1` to `attributeNameN` from `document`.
All other attributes will be preserved.

To do the opposite, see [KEEP()](#keep).
To do the opposite, see [`KEEP()`](#keep).

- **document** (object): a document / object
- **attributeNames** (string, *repeatable*): an arbitrary number of attribute
Expand Down Expand Up @@ -887,7 +887,7 @@ RETURN UNSET(doc, ["foo", "bar"])
Recursively remove the attributes `attributeName1` to `attributeNameN` from
`document` and its sub-documents. All other attributes will be preserved.

To do the opposite, use [KEEP_RECURSIVE()](#keep_recursive).
To do the opposite, use [`KEEP_RECURSIVE()`](#keep_recursive).

- **document** (object): a document / object
- **attributeNames** (string, *repeatable*): an arbitrary number of attribute
Expand Down
4 changes: 2 additions & 2 deletions site/content/3.12/aql/functions/fulltext.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ It is recommended to use [Inverted indexes](../../index-and-search/indexing/work
Return all documents from collection *coll*, for which the attribute *attribute*
matches the fulltext search phrase *query*, optionally capped to *limit* results.

**Note**: the *FULLTEXT()* function requires the collection *coll* to have a
**Note**: the `FULLTEXT()` function requires the collection *coll* to have a
fulltext index on *attribute*. If no fulltext index is available, this function
will fail with an error at runtime. It doesn't fail when explaining the query however.

Expand All @@ -32,7 +32,7 @@ will fail with an error at runtime. It doesn't fail when explaining the query ho
to at most this number of documents
- returns **docArray** (array): an array of documents

*FULLTEXT()* is not meant to be used as an argument to `FILTER`,
`FULLTEXT()` is not meant to be used as an argument to `FILTER`,
but rather to be used as the expression of a `FOR` statement:

```aql
Expand Down
2 changes: 1 addition & 1 deletion site/content/3.12/aql/functions/geo.md
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ RETURN GEO_POLYGON([
`GEO_MULTIPOLYGON(polygons) → geoJson`

Construct a GeoJSON MultiPolygon. Needs at least two Polygons inside.
See [GEO_POLYGON()](#geo_polygon) and [GeoJSON MultiPolygon](#multipolygon)
See [`GEO_POLYGON()`](#geo_polygon) and [GeoJSON MultiPolygon](#multipolygon)
for the rules of Polygon and MultiPolygon construction.

- **polygons** (array): an array of arrays of arrays of `[longitude, latitude]` pairs
Expand Down
Loading