Oihana PHP Arango

in.php

Table of Contents

Functions

in()  : string
Returns an AQL expression that checks if the left operand is contained in the right operand array.

Functions

in()

Returns an AQL expression that checks if the left operand is contained in the right operand array.

in(mixed $leftOperand, mixed $rightOperand) : string

Equivalent to the ArangoDB IN comparison operator.

Example:

  • 1.5 IN [ 2, 3, 1.5 ] returns true
  • 42 IN [ 2, 3, 1.5 ] returns false
Parameters
$leftOperand : mixed

The value or expression to look for.

$rightOperand : mixed

The array expression to search in.

Tags
example
echo in('1.5', '[ 2, 3, 1.5 ]');
// 1.5 IN [ 2, 3, 1.5 ]

echo in('user.role', "['admin','user']");
// user.role IN ['admin','user']
see
https://docs.arangodb.com/stable/aql/operators/#array-comparison-operators
since
1.0.0
author

Marc Alcaraz

Return values
string

The AQL predicate string.

On this page

Search results