aqlBind.php
Table of Contents
Functions
- aqlBind() : string
- Binds a value to an AQL variable.
Functions
aqlBind()
Binds a value to an AQL variable.
aqlBind(mixed $value[, array<string|int, mixed> &$binds = [] ][, string|null $to = null ][, string|null $toPrefix = null ][, bool $isCollection = false ]) : string
If $to is not provided, a unique variable name will be automatically queryId (e.g. query_123456).
If $isCollection is true, the variable will be prefixed with @@
(used for collection binding in AQL). Otherwise, it uses a single @.
Parameters
- $value : mixed
-
The value to bind (e.g. scalar, array, object).
- $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
@). Ifnull, one is auto-generated. - $toPrefix : string|null = null
-
The optional prefix to prepend the variable name.
- $isCollection : bool = false
-
Whether the binding targets a collection (
@@) or a value (@).
Tags
Return values
string —The formatted AQL bind variable (e.g. '@userId' or '@@collection').