mergeRecursive.php
Table of Contents
Functions
- mergeRecursive() : string
- Recursively merge multiple documents into a single document.
Functions
mergeRecursive()
Recursively merge multiple documents into a single document.
mergeRecursive(string|array<string|int, mixed>|null $documents) : string
Wraps the ArangoDB AQL function MERGE_RECURSIVE(document1, … documentN). Unlike
merge(), sub-documents with the same key are merged recursively rather than
replaced wholesale.
Example AQL usage:
MERGE_RECURSIVE({a: {b: 1}}, {a: {c: 2}}) // returns {a: {b: 1, c: 2}}
Parameters
- $documents : string|array<string|int, mixed>|null
-
Multiple documents to merge (at least 2 required).
Tags
Return values
string —The formatted AQL expression.