Oihana PHP Arango

parseIdentifier.php

Table of Contents

Functions

parseIdentifier()  : string
Return the collection name and key of a document identifier as an object.

Functions

parseIdentifier()

Return the collection name and key of a document identifier as an object.

parseIdentifier(string $documentIdentifier) : string

Wraps the ArangoDB AQL function PARSE_IDENTIFIER(documentIdentifier), which returns { collection, key }.

Example AQL usage:

PARSE_IDENTIFIER("products/123")   // returns {collection: "products", key: "123"}
PARSE_IDENTIFIER(doc._id)          // parts of the current document handle
Parameters
$documentIdentifier : string

A document handle / _id expression or string literal.

Tags
example
use function oihana\arango\db\functions\documents\parseIdentifier;

$expr = parseIdentifier('doc._id');
// Produces: 'PARSE_IDENTIFIER(doc._id)'
see
https://docs.arangodb.com/stable/aql/functions/document-object/#parse_identifier
since
1.1.0
author

Marc Alcaraz

Return values
string

The formatted AQL expression.

On this page

Search results