sortJoinVariable.php
Table of Contents
Functions
- sortJoinVariable() : string
- Generates the internal AQL 'SORT' clause for an edge variable subquery.
Functions
sortJoinVariable()
Generates the internal AQL 'SORT' clause for an edge variable subquery.
sortJoinVariable(array<string|int, mixed>|string|null $definition[, string $docRef = AQL::DOC_JOIN ][, string $defaultProperty = Schema::_KEY ]) : string
This helper method interprets a flexible sort definition and constructs the appropriate AQL 'SORT' expression.
- If $definition is an array: Looks for
AQL::SORT(property) andAQL::ORDER(ASC/DESC) and sorts by the vertex property. - If $definition is a string (legacy): Sorts by that string as the property on the vertex in ASC order.
- If $definition is null (or
AQL::SORTis not set in the array): Sorts by the $defaultProperty (e.g., 'created') on the edge in DESC order.
Parameters
- $definition : array<string|int, mixed>|string|null
-
The sort configuration. Typically the
$definitionarray from getEdgeVariable. - $docRef : string = AQL::DOC_JOIN
- $defaultProperty : string = Schema::_KEY
-
The fallback property to sort by (default: 'created').
Tags
Return values
string —The generated AQL 'SORT' clause (e.g., "SORT v_myVar_collectionName.name ASC").