Oihana PHP Arango

AqlQuery

Read onlyYes

Immutable representation of an AQL query and its bind parameters.

Instances are typically obtained through the aql() helper (which produces them from a string template + variadic values), or constructed directly when the caller already holds a (query, bindVars) pair — for example when the query was assembled by a query builder.

Example:

// Built via the aql() helper:
$query = aql( 'FOR u IN users FILTER u.age > ? RETURN u' , 18 ) ;

// Or built directly (typical for query-builder output):
$query = new AqlQuery
(
    'FOR u IN users FILTER u.age > @minAge RETURN u' ,
    [ 'minAge' => 18 ] ,
) ;
Tags
author

Marc Alcaraz (ekameleon)

since
1.0.0

Table of Contents

Properties

$bindVars  : array<string|int, mixed>
$query  : string

Methods

__construct()  : mixed

Properties

$bindVars

public array<string|int, mixed> $bindVars = []

Methods

__construct()

public __construct(string $query[, array<string, mixed> $bindVars = [] ]) : mixed
Parameters
$query : string

Raw AQL query string. Bind references use ArangoDB's @name (values) or @@name (collections) syntax.

$bindVars : array<string, mixed> = []

Map of bind name → value (without the leading @).

On this page

Search results