unsetAttributes.php
Table of Contents
Functions
- unsetAttributes() : string
- Remove the given top-level attributes from a document.
Functions
unsetAttributes()
Remove the given top-level attributes from a document.
unsetAttributes(string $document, string ...$attributes) : string
Wraps the ArangoDB AQL function UNSET(document, attributeName1, … attributeNameN).
The attribute names are emitted as quoted string literals (json_encode); the document
stays a raw expression.
Named
unsetAttributes()rather thanunset()becauseunsetis a reserved PHP keyword.
Example AQL usage:
UNSET(doc, "_id", "_rev") // a copy of doc without its _id and _rev attributes
Parameters
- $document : string
-
The document variable or expression.
- $attributes : string
-
The attribute names to remove.
Tags
Return values
string —The formatted AQL expression.