Skip to content

Commit aa90304

Browse files
committed
Create concatArrays accumulator
1 parent ae31f00 commit aa90304

File tree

5 files changed

+66
-2
lines changed

5 files changed

+66
-2
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# $schema: ../schema.json
2+
name: $concatArrays
3+
link: 'https://www.mongodb.com/docs/manual/reference/operator/aggregation/concatArrays/'
4+
type:
5+
- accumulator
6+
- window
7+
- resolvesToArray
8+
encode: single
9+
description: |
10+
Concatenates arrays to return the concatenated array.
11+
arguments:
12+
-
13+
name: array
14+
type:
15+
- resolvesToArray # of arrays
16+
variadic: array
17+
description: |
18+
An array of expressions that resolve to an array.
19+
If any argument resolves to a value of null or refers to a field that is missing, `$concatArrays` returns `null`.
20+
tests:
21+
-
22+
name: 'Warehouse collection'
23+
link: 'https://www.mongodb.com/docs/manual/reference/operator/aggregation/concatArrays/#example'
24+
pipeline:
25+
-
26+
$project:
27+
items:
28+
$concatArrays:
29+
- '$instock'
30+
- '$ordered'

src/Builder/Accumulator/FactoryTrait.php

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/Builder/Accumulator/Pipelines.php

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/specifications

Submodule specifications updated 36 files

0 commit comments

Comments
 (0)