Language briefs / Coming from AQL

Bring your
query instincts.

Familiar clauses and document conventions give AQL users a useful starting point. These are the differences to check first.

01

A lot will look familiar.

FOR … FILTER … SORT … LIMIT … RETURN, @bind values and the _key, _id, _from and _to conventions carry over. Multiple FOR clauses and bounded traversals are supported. CGQL has its own grammar and supported feature set.

02

A small rewrite, made explicit.

Find handles containing “rook”, ignoring case, and return up to ten. In the AQL example, bind take to 10.

AQL
FOR a IN accounts
  FILTER LIKE(a.handle, "%rook%", true)
  LIMIT @take
  RETURN a.handle
CGQL
FOR a IN accounts
  FILTER CONTAINS(LOWER(a.handle), "rook")
  LIMIT 10
  RETURN a.handle

LIKE becomes CONTAINS with LOWER; a bound limit becomes a literal integer. This example uses ASCII handles.

03

Check these before moving a workload.

A few practical differences; the full migration guide covers the rest
AreaCGQL boundary
Query textDouble-quoted strings; literal limits; no @@collection binds or bracket attribute access.
Graph queriesName an edge collection. Named graphs, PRUNE and traversal OPTIONS are unsupported.
HTTP resultsUse bind_vars in the request. Results arrive as a complete set, without AQL’s cursor API.
Search & writesFull-text search uses an HTTP endpoint. Mutations need explicit enablement and write authorization.

Scope: ArangoDB 3.11/3.12 AQL compared with CogniGraph's CGQL. Both CogniGraph editions use Native storage. Query rewrites and data conversion are separate migration steps; direct dump import is not yet available.