Oihana PHP Arango

unique.php

Table of Contents

Functions

unique()  : string
Return all unique elements in anyArray. To determine uniqueness, the function will use the comparison order.

Functions

unique()

Return all unique elements in anyArray. To determine uniqueness, the function will use the comparison order.

unique(mixed $anyArray) : string

Example AQL usage:

RETURN UNIQUE( [ 1,2,2,3,3,3,4,4,4,4,5,5,5,5,5 ] )
Parameters
$anyArray : mixed

an array with elements of arbitrary type

Tags
example
use function oihana\arango\db\functions\arrays\unique;

$expr = unique('[1, 1, 2, 3]');
// Produces: 'UNIQUE([1, 1, 2, 3])'
see
https://docs.arango.ai/arangodb/stable/aql/functions/array/#unique
since
1.0.0
author

Marc Alcaraz

Return values
string

The formatted AQL expression.

On this page

Search results