Oihana PHP Arango

typeName.php

Table of Contents

Functions

typeName()  : string
Returns the data type name of the given value in AQL.

Functions

typeName()

Returns the data type name of the given value in AQL.

typeName(mixed $value) : string

This helper wraps the ArangoDB AQL function TYPENAME(), which returns a string representing the type of the provided value.

Possible return values:

  • "null"
  • "bool"
  • "number"
  • "string"
  • "array"
  • "object"

Example AQL output:

TYPENAME(doc.age)  // "number"
Parameters
$value : mixed

The AQL field or expression to evaluate.

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

$expr = typeName('doc.age');
// Produces: 'TYPENAME(doc.age)'
see
https://docs.arangodb.com/stable/aql/functions/type-check-and-cast/#typename
since
1.0.0

author Marc Alcaraz

Return values
string

The formatted AQL expression (e.g., 'TYPENAME(doc.age)').

On this page

Search results