Oihana PHP Arango

firstDocument.php

Table of Contents

Functions

firstDocument()  : string
Return the first alternative that is a document, and null if none of the alternatives is a document.

Functions

firstDocument()

Return the first alternative that is a document, and null if none of the alternatives is a document.

firstDocument(mixed ...$alternative) : string

This helper wraps the ArangoDB AQL function FIRST_DOCUMENT().

Example AQL output:

FIRST_DOCUMENT(null, null, "foo", "bar") // "foo"
Parameters
$alternative : mixed

input of arbitrary type

Tags
example
use function oihana\arango\db\functions\firstDocument;

$expr = firstDocument('null,doc,'hello');
// Produces: 'FIRST_DOCUMENT(null,doc,'hello')'
see
https://docs.arangodb.com/stable/aql/functions/miscellaneous/#first_document
since
1.0.0

author Marc Alcaraz

Return values
string

The formatted AQL expression (e.g. 'FIRST_DOCUMENT(alternative,....)').

On this page

Search results