Oihana PHP Arango

AqlBindReference

Read onlyYes
FinalYes

A reference to an AQL bind variable by name — a placeholder for a value supplied at query time, never inlined into the query text.

Where a literal value is written straight into the compiled AQL (via aqlValue()), a bind reference renders only the token @name; the matching value lives in the query's single bindVars map, contributed by the caller through the existing top-level bind mechanism (AQL::BINDS). The reference registers no value and touches no bind map: it only names the slot.

A dedicated value object (detected by instanceof) is used rather than a marker string: on the value side of a condition a plain string is already a legitimate literal (a value may legitimately start with @), so a string convention would be ambiguous — the object is not.

Build one with aqlBindRef(), which validates the name first.

Tags
since
1.6.0
author

Marc Alcaraz

Table of Contents

Properties

$name  : string

Methods

__construct()  : mixed
Creates a new AqlBindReference instance.
toAql()  : string
Renders the reference as an AQL bind token, e.g. `@allowedRegions`.

Properties

Methods

__construct()

Creates a new AqlBindReference instance.

public __construct(string $name) : mixed
Parameters
$name : string

The bind variable name (validated by aqlBindRef()).

toAql()

Renders the reference as an AQL bind token, e.g. `@allowedRegions`.

public toAql() : string
Return values
string

The formatted bind variable token.

On this page

Search results