Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

17. The query request

17.1 query.execute

Every query reaches the engine as a query.execute request:

{"operation": "query.execute",
 "payload": {"query": "on view sales.paid | where region == $r", "params": {"r": "EU"}, "readOnly": true}}
FieldMeaning
queryThe OGML text
paramsThe values of $name (7.1)
readOnlyRefuses a write (query.read_only_violation)
Place and App instanceThe scope of the request, set by the session that sends it, never by the query text

The query service prepares the text before planning: it binds parameters, evaluates let, resolves views and their caches, and writes values sources. The bare pipeline layer of the engine library does none of this.

17.2 Introspection operations

OperationReturns
query.stagesEvery stage with its forms, arguments, placement and properties (the catalogue of chapter 9)
collections.listCollections, with system and virtual flags ({"stats": true} adds counts)
core.operationsEvery operation the node exposes

17.3 From a terminal

ogcli sends the same request: ogcli 'on users | limit 3', with --param NAME=VALUE for parameters, and a line starting with . (.query.stages) for an operation.