Oihana PHP Arango

document.php

Table of Contents

Functions

document()  : string
Dynamically look up one or multiple documents from any collections, either using a collection name and one or more document keys, or one or more document identifiers.

Functions

document()

Dynamically look up one or multiple documents from any collections, either using a collection name and one or more document keys, or one or more document identifiers.

document(mixed ...$values) : string

The collections do not need to be known at query compile time, they can be computed at runtime.

This helper wraps the ArangoDB AQL function DOCUMENT().

Example AQL output:

RETURN DOCUMENT( persons, "persons/alice" )
Parameters
$values : mixed
Tags
example
use function oihana\arango\db\functions\document;

$expr = document( 'persons', '"alice"' );
// Produces: 'DOCUMENT(persons,"alice")'
see
https://docs.arangodb.com/stable/aql/functions/miscellaneous/#document
since
1.0.0

author Marc Alcaraz

Return values
string

The formatted AQL expression (e.g. 'NOT_NULL(user.email)').

On this page

Search results