Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
6 changes: 3 additions & 3 deletions site/content/3.12/aql/functions/array.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ RETURN APPEND([ 1, 2, 3 ], [ 3, 4, 5, 2, 9 ], true)

## CONTAINS_ARRAY()

This is an alias for [POSITION()](#position).
This is an alias for [`POSITION()`](#position).

## COUNT()

This is an alias for [LENGTH()](#length).
This is an alias for [`LENGTH()`](#length).

## COUNT_DISTINCT()

Expand Down Expand Up @@ -100,7 +100,7 @@ RETURN COUNT_DISTINCT([ "yes", "no", "yes", "sauron", "no", "yes" ])

## COUNT_UNIQUE()

This is an alias for [COUNT_DISTINCT()](#count_distinct).
This is an alias for [`COUNT_DISTINCT()`](#count_distinct).

## FIRST()

Expand Down
2 changes: 1 addition & 1 deletion site/content/3.12/aql/functions/document-object.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ FOR attributeArray IN attributesPerDocument

## COUNT()

This is an alias for [LENGTH()](#length).
This is an alias for [`LENGTH()`](#length).

## HAS()

Expand Down
2 changes: 1 addition & 1 deletion site/content/3.12/aql/functions/miscellaneous.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Return an array of collections.

### COUNT()

This is an alias for [LENGTH()](#length).
This is an alias for [`LENGTH()`](#length).

### CURRENT_DATABASE()

Expand Down
10 changes: 7 additions & 3 deletions site/content/3.12/aql/functions/numeric.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ AVERAGE( [ 999, 80, 4, 4, 4, 3, 3, 3 ] ) // 137.5

## AVG()

This is an alias for [AVERAGE()](#average).
This is an alias for [`AVERAGE()`](#average).

## CEIL()

Expand Down Expand Up @@ -577,6 +577,10 @@ Result:
]
```

## RANDOM()

This is an alias for [`RAND()`](#rand).

## RANGE()

`RANGE(start, stop, step) → numArray`
Expand Down Expand Up @@ -704,7 +708,7 @@ STDDEV_SAMPLE( [ 1, 3, 6, 5, 2 ] ) // 2.0736441353327724

## STDDEV()

This is an alias for [STDDEV_POPULATION()](#stddev_population).
This is an alias for [`STDDEV_POPULATION()`](#stddev_population).

## SUM()

Expand Down Expand Up @@ -769,4 +773,4 @@ VARIANCE_SAMPLE( [ 1, 3, 6, 5, 2 ] ) // 4.300000000000001

## VARIANCE()

This is an alias for [VARIANCE_POPULATION()](#variance_population).
This is an alias for [`VARIANCE_POPULATION()`](#variance_population).
63 changes: 62 additions & 1 deletion site/content/3.12/aql/functions/string.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ RETURN CONTAINS("foobarbaz", "horse", true)

## COUNT()

This is an alias for [LENGTH()](#length).
This is an alias for [`LENGTH()`](#length).

## CRC32()

Expand Down Expand Up @@ -1233,6 +1233,45 @@ description: ''
RETURN REGEX_REPLACE("An Avocado", "a", "_", true)
```

## REPEAT()

`REPEAT(value, count, separator) → repeatedString`

Repeat the input as many times as specified, optionally with a separator.

- **value** (string): a string
- **count** (number): how often to repeat the `value`
- **separator** (string, *optional*): a string to place between repetitions
- returns **repeatedString** (string\|null): a new string with the `value`
repeated `count` times, or `null` and a warning if the output string exceeds
the limit of 16 MB

**Examples**

```aql
---
name: aqlRepeat_1
description: ''
---
RETURN REPEAT("foo", 3)
```

```aql
---
name: aqlRepeat_2
description: ''
---
RETURN REPEAT("foo", 3, " | ")
```

```aql
---
name: aqlRepeat_3
description: ''
---
RETURN REPEAT(5, 5)
```

## REVERSE()

`REVERSE(value) → reversedString`
Expand Down Expand Up @@ -1892,6 +1931,28 @@ RETURN [
]
```

## TO_CHAR()

`TO_CHAR(codepoint) → character`

Return the character with the specified codepoint.

- **codepoint** (number): a Unicode codepoint
- returns **character** (string): the character with the specified codepoint

**Examples**

```aql
---
name: aqlToChar
description: ''
---
RETURN [
TO_CHAR(216),
TO_CHAR(0x1F951)
]
```

## TO_HEX()

`TO_HEX(value) → hexString`
Expand Down
6 changes: 3 additions & 3 deletions site/content/3.12/aql/functions/type-check-and-cast.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ TO_ARRAY({foo: 1, bar: 2, baz: [3, 4, 5]}) // [1, 2, [3, 4, 5]]

`TO_LIST(value) → array`

This is an alias for [TO_ARRAY()](#to_array).
This is an alias for [`TO_ARRAY()`](#to_array).

## Type check functions

Expand Down Expand Up @@ -205,7 +205,7 @@ Check whether *value* is an array / list

`IS_LIST(value) → bool`

This is an alias for [IS_ARRAY()](#is_array)
This is an alias for [`IS_ARRAY()`](#is_array)

### IS_OBJECT()

Expand All @@ -221,7 +221,7 @@ Check whether *value* is an object / document

`IS_DOCUMENT(value) → bool`

This is an alias for [IS_OBJECT()](#is_object)
This is an alias for [`IS_OBJECT()`](#is_object)

### IS_DATESTRING()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,15 @@ less overhead.

See [Document and object functions in AQL](../../aql/functions/document-object.md#parse_collection).

The new `REPEAT()` function repeats the input value a given number of times,
optionally with a separator between repetitions, and returns the resulting string.
The new `TO_CHAR()` functions lets you specify a numeric Unicode codepoint and
returns the corresponding character as a string.

See [String functions in AQL](../../aql/functions/string.md#repeat).

A numeric function `RANDOM()` has been added as an alias for the existing `RAND()`.

## Indexing

### Stored values can contain the `_id` attribute
Expand Down