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
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
16 changes: 16 additions & 0 deletions site/data/3.12/cache.json
Original file line number Diff line number Diff line change
Expand Up @@ -2575,6 +2575,18 @@
"request": "LS0tCm5hbWU6IGFxbFJlZ2V4VGVzdF8zCmRlc2NyaXB0aW9uOiAnJwotLS0KUkVUVVJOIFJFR0VYX1RFU1QoInRoZVxcbnF1aWNrXFxuYnJvd25cXG5mb3giLCAiXnRoZShcXG5bYS13XSspK1xcbmZveCQiKQ==",
"response": "eyJpbnB1dCI6IlJFVFVSTiBSRUdFWF9URVNUKFwidGhlXFxcXG5xdWlja1xcXFxuYnJvd25cXFx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
},
"aqlRepeat_3_single": {
"request": "LS0tCm5hbWU6IGFxbFJlcGVhdF8zCmRlc2NyaXB0aW9uOiAnJwotLS0KUkVUVVJOIFJFUEVBVCg1LCA1KQ==",
"response": "eyJpbnB1dCI6IlJFVFVSTiBSRVBFQVQoNSwgNSkiLCJvdXRwdXQiOiJbIFxuICBcIjU1NTU1XCIgXG5dIiwiZXJyb3IiOiIiLCJvcHRpb25zIjp7ImRlc2NyaXB0aW9uIjoiIiwibmFtZSI6ImFxbFJlcGVhdF8zIiwidHlwZSI6InNpbmdsZSIsInJlbmRlciI6ImlucHV0L291dHB1dCJ9fQo="
},
"aqlReverse_1_single": {
"request": "LS0tCm5hbWU6IGFxbFJldmVyc2VfMQpkZXNjcmlwdGlvbjogJycKLS0tClJFVFVSTiBSRVZFUlNFKCJmb29iYXIiKQ==",
"response": "eyJpbnB1dCI6IlJFVFVSTiBSRVZFUlNFKFwiZm9vYmFyXCIpIiwib3V0cHV0IjoiW29iamVjdCBBcmFuZ29RdWVyeUN1cnNvciwgY291bnQ6IDEsIGNhY2hlZDogZmFsc2UsIGhhc01vcmU6IGZhbHNlXVxuXG5bIFxuICBcInJhYm9vZlwiIFxuXSIsImVycm9yIjoiIiwib3B0aW9ucyI6eyJkZXNjcmlwdGlvbiI6IiIsIm5hbWUiOiJhcWxSZXZlcnNlXzEiLCJ0eXBlIjoic2luZ2xlIiwicmVuZGVyIjoiaW5wdXQvb3V0cHV0In19Cg=="
Expand Down Expand Up @@ -2715,6 +2727,10 @@
"request": "LS0tCm5hbWU6IGFxbFRvQmFzZTY0CmRlc2NyaXB0aW9uOiAnJwotLS0KUkVUVVJOIFsKICBUT19CQVNFNjQoIkFCQy4iKSwKICBUT19CQVNFNjQoIjEyMzQ1NiIpCl0=",
"response": "eyJpbnB1dCI6IlJFVFVSTiBbXG4gIFRPX0JBU0U2NChcIkFCQy5cIiksXG4gIFRPX0JBU0U2NChcIjEyMzQ1NlwiKVxuXSIsIm91dHB1dCI6IltvYmpl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5bIFxuICBbIFxuICAgIFwiNDE0MjQzMmVcIiwgXG4gICAgXCJjM2JjXCIgXG4gIF0gXG5dIiwiZXJyb3IiOiIiLCJvcHRpb25zIjp7ImRlc2NyaXB0aW9uIjoiIiwibmFtZSI6ImFxbFRvSGV4IiwidHlwZSI6InNpbmdsZSIsInJlbmRlciI6ImlucHV0L291dHB1dCJ9fQo="
Expand Down