Oihana PHP Arango

parseKey.php

Table of Contents

Functions

parseKey()  : string
Return the key part of a document identifier.

Functions

parseKey()

Return the key part of a document identifier.

parseKey(string $documentIdentifier) : string

Wraps the ArangoDB AQL function PARSE_KEY(documentIdentifier).

Example AQL usage:

PARSE_KEY("products/123")   // returns "123"
PARSE_KEY(doc._id)          // key of the current document
Parameters
$documentIdentifier : string

A document handle / _id expression or string literal.

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

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

Marc Alcaraz

Return values
string

The formatted AQL expression.

On this page

Search results