Chaining — AFTER, AND, OR
Three connectors link every OQL statement. AFTER is sequential. AND is true parallel execution on the thread pool. OR is fallback — it only runs if the preceding step failed or returned null. No callbacks, no promises, no async/await.
| Operator | Meaning | Analogy |
|---|---|---|
AFTER | Sequential — next step runs when this one completes | await |
AND | Parallel — branches execute simultaneously | Promise.all |
OR | Fallback — executes only if the preceding step failed or returned null | catch / else |
AFTER — sequential pipeline
Each AFTER step has full access to everything set by previous steps.
AND — parallel execution
AND branches execute simultaneously on the runtime thread pool. Each branch must use a separate variable name for independent values.
Multivariables — AND with shared name
When AND branches bind to the same variable name, OQL creates a multivariable — a parallel structure holding one result per branch. Use COLLAPSE to merge into an array.
OR — fallback chain
OR runs only if the preceding step returned an error or null. Use it for retry logic, default values, and error routing.
Mixing operators
A single query can use all three. Parallel branches resolve before the next AFTER step executes.