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}}
| Field | Meaning |
|---|---|
query | The OGML text |
params | The values of $name (7.1) |
readOnly | Refuses a write (query.read_only_violation) |
| Place and App instance | The 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
| Operation | Returns |
|---|---|
query.stages | Every stage with its forms, arguments, placement and properties (the catalogue of chapter 9) |
collections.list | Collections, with system and virtual flags ({"stats": true} adds counts) |
core.operations | Every 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.