Oihana PHP Arango

aqlLiteral.php

Table of Contents

Functions

aqlLiteral()  : AqlLiteral
Convenience helper for {@see AqlLiteral} construction.

Functions

aqlLiteral()

Convenience helper for {@see AqlLiteral} construction.

aqlLiteral(string $value) : AqlLiteral

Wraps a raw AQL fragment so that aql() interpolates it verbatim into the resulting query string instead of binding it as a parameter. The fragment MUST come from a trusted source (validated whitelist, server-side enum, …) — never from raw user input.

Example:

$cursor = $db->query
(
    aql( 'FOR u IN users SORT u.name ? RETURN u' , aqlLiteral( 'DESC' ) )
) ;
// → "FOR u IN users SORT u.name DESC RETURN u"
Parameters
$value : string

Raw AQL fragment to inline.

Return values
AqlLiteral
On this page

Search results