keepRecursive.php
Table of Contents
Functions
- keepRecursive() : string
- Keep only the given attributes of a document, recursing into sub-documents.
Functions
keepRecursive()
Keep only the given attributes of a document, recursing into sub-documents.
keepRecursive(string $document, string ...$attributes) : string
Wraps the ArangoDB AQL function KEEP_RECURSIVE(document, attributeName1, … attributeNameN).
The attribute names are emitted as quoted string literals (json_encode); the document
stays a raw expression.
Example AQL usage:
KEEP_RECURSIVE(doc, "name", "meta") // keeps name/meta at every nesting level
Parameters
- $document : string
-
The document variable or expression.
- $attributes : string
-
The attribute names to keep at every level.
Tags
Return values
string —The formatted AQL expression.