attributes.php
Table of Contents
Functions
- attributes() : string
- Return the attribute keys of a document.
Functions
attributes()
Return the attribute keys of a document.
attributes(string $document[, bool|null $removeSystemAttrs = null ][, bool|null $sort = null ]) : string
Wraps the ArangoDB AQL function ATTRIBUTES(document, removeSystemAttrs, sort)
(also aliased as KEYS()).
Example AQL usage:
ATTRIBUTES({b: 2, _key: "x", a: 1}) // returns ["b", "_key", "a"]
ATTRIBUTES({b: 2, _key: "x", a: 1}, true) // returns ["b", "a"]
ATTRIBUTES({b: 2, _key: "x", a: 1}, true, true) // returns ["a", "b"]
Parameters
- $document : string
-
The document variable or expression.
- $removeSystemAttrs : bool|null = null
-
Whether to omit system attributes (
_id,_key,_rev, ...). - $sort : bool|null = null
-
Whether to sort the keys alphabetically.
Tags
Return values
string —The formatted AQL expression.