Oihana PHP Arango

isArray.php

Table of Contents

Functions

isArray()  : string
Builds an AQL expression that checks whether a given value is an array (list or object array).

Functions

isArray()

Builds an AQL expression that checks whether a given value is an array (list or object array).

isArray(string $value) : string

This helper wraps the ArangoDB AQL function IS_ARRAY() and returns a string representation of the corresponding expression.

The AQL function IS_ARRAY(value) evaluates to true if the provided value is an array (either a list or an object array), and false otherwise.

Example output:

IS_ARRAY(doc.tags)
Parameters
$value : string

The AQL field or expression to check (e.g. 'doc.tags').

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

$expr = isArray('doc.tags');
// Produces: 'IS_ARRAY(doc.tags)'
see
https://docs.arangodb.com/stable/aql/functions/type-check-and-cast/#is_array
since
1.0.0
author

Marc Alcaraz

Return values
string

The AQL expression as a string (e.g. 'IS_ARRAY(doc.tags)').

On this page

Search results