Oihana PHP Arango

isNumber.php

Table of Contents

Functions

isNumber()  : string
Builds an AQL expression that checks whether a value is a number.

Functions

isNumber()

Builds an AQL expression that checks whether a value is a number.

isNumber(string $value) : string

This helper wraps the ArangoDB AQL function IS_NUMBER(), which returns true if the given value is a numeric type, and false otherwise.

Example AQL output:

IS_NUMBER(doc.age)
Parameters
$value : string

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

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

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

author Marc Alcaraz

Return values
string

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

On this page

Search results