Oihana PHP Arango

firstList.php

Table of Contents

Functions

firstList()  : string
Return the first alternative that is an array, and null if none of the alternatives is an array.

Functions

firstList()

Return the first alternative that is an array, and null if none of the alternatives is an array.

firstList(mixed ...$alternative) : string

This helper wraps the ArangoDB AQL function FIRST_LIST().

Example AQL output:

FIRST_LIST(null, null, ["foo"], "bar") // ["foo"]
Parameters
$alternative : mixed

input of arbitrary type

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

$expr = firstList('null,doc,["hello"]);
// Produces: 'FIRST_LIST(null,doc,["hello"])'
see
https://docs.arangodb.com/stable/aql/functions/miscellaneous/#first_list
since
1.0.0

author Marc Alcaraz

Return values
string

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

On this page

Search results