isSameCollection.php
Table of Contents
Functions
- isSameCollection() : string
- Test whether a document identifier belongs to a given collection.
Functions
isSameCollection()
Test whether a document identifier belongs to a given collection.
isSameCollection(string $collectionName, string $documentIdentifier) : string
Wraps the ArangoDB AQL function IS_SAME_COLLECTION(collectionName, documentIdentifier).
The collection name is emitted as a quoted string literal (json_encode); the document
identifier stays a raw expression (typically doc._id).
Example AQL usage:
IS_SAME_COLLECTION("products", "products/123") // returns true
IS_SAME_COLLECTION("products", doc._id) // true if doc lives in products
Parameters
- $collectionName : string
-
The collection name (emitted as a quoted string literal).
- $documentIdentifier : string
-
A document handle /
_idexpression or string literal.
Tags
Return values
string —The formatted AQL expression.