Oihana PHP Arango

rangeOperator.php

Table of Contents

Functions

rangeOperator()  : string
Generates an AQL range expression using the range operator (`..`).

Functions

rangeOperator()

Generates an AQL range expression using the range operator (`..`).

rangeOperator(int|float|string $minimum, int|float|string $maximum) : string

The range operator can be used in AQL FOR loops to iterate over a sequence of numeric values, inclusive of both $minimum and $maximum.

Example output:

2010..2013

which can be iterated as [2010, 2011, 2012, 2013] in AQL queries.

Parameters
$minimum : int|float|string

The start value of the range.

$maximum : int|float|string

The end value of the range.

Tags
example
echo rangeOperator(2010, 2013);
// Outputs: "2010 .. 2013"

echo rangeOperator('1', '5');
// Outputs: "1 .. 5"
see
https://docs.arangodb.com/3.11/aql/operators/#range-operator
Return values
string

The AQL range expression as a string.

On this page

Search results