Oihana PHP Arango

aqlBindCollection.php

Table of Contents

Functions

aqlBindCollection()  : string
Binds a collection name to an AQL variable.

Functions

aqlBindCollection()

Binds a collection name to an AQL variable.

aqlBindCollection(mixed $value[, array<string|int, mixed> &$binds = [] ][, string|null $to = null ][, string|null $toPrefix = null ]) : string

In AQL, collections are bound using double @ prefixes (e.g. @@collection).

Parameters
$value : mixed

The collection name to bind.

$binds : array<string|int, mixed> = []

The array of all existing bindings. It is updated by reference.

$to : string|null = null

The bind variable name (without @). If null, one is auto-generated.

$toPrefix : string|null = null

The optional prefix to prepend the variable name (default 'c').

Tags
throws
BindException

If the provided variable name is invalid.

example
$binds = [];

$collectionVar = aqlBindCollection('users', $binds);
// $collectionVar => '@@c_654321'
// $binds         => [ '@c_654321' => 'users' ]
since
1.0.0
author

Marc Alcaraz

Return values
string

The formatted AQL collection bind variable (e.g. '@@collection').

On this page

Search results