exists.php
Table of Contents
Functions
- exists() : string
- Match documents where an attribute is present (optionally of a given type).
Functions
exists()
Match documents where an attribute is present (optionally of a given type).
exists(string $path[, string|null $type = null ][, string|null $analyzer = null ]) : string
Wraps the ArangoDB AQL function EXISTS(path[, type[, analyzer]]):
exists('doc.text')— the attribute is present;exists('doc.text', 'string')— present and of the given data type ("null","bool"/"boolean","numeric","type","string","analyzer","nested");exists('doc.text', analyzer: 'text_en')— present and indexed by the given Analyzer; the"analyzer"type literal is filled in automatically.
With arangosearch Views, EXISTS() only matches values if the
storeValues link property is set to "id" (default "none").
Example AQL usage:
EXISTS(doc.text)
EXISTS(doc.text, "string")
EXISTS(doc.text, "analyzer", "text_en")
Parameters
- $path : string
-
Attribute path expression to test (kept raw).
- $type : string|null = null
-
Optional data type to test for (emitted as a quoted string literal). Defaults to
"analyzer"when$analyzeris provided. - $analyzer : string|null = null
-
Optional Analyzer name (emitted as a quoted string literal).
Tags
Return values
string —The formatted AQL expression.