Skip to content

From Request to SQL

Zucchy00 edited this page Aug 20, 2026 · 4 revisions

VoidQL processing pipeline

1. Resolve the table and endpoint

query.table selects an entry from the Structure. query.type selects the corresponding endpoint. Missing tables, endpoints, or role entries are rejected.

2. Resolve permissions

VoidQL reads allowed/allow and disallowed/deny from the selected role. It validates requested fields against the table map and applicable endpoint policy.

3. Combine row constraints

The request's where clause is combined with policy-derived conditions. Policy conditions are not a post-query filter: they participate in the built database operation.

4. Resolve dynamic values

Values such as $user, $data, column references, and trigger-stage values are resolved using the current request context.

5. Execute within a transaction

The current implementation executes a single built query inside db.transaction. Before triggers run first; the selected GET, POST, PUT, or DELETE operation follows; after triggers run last.

6. Return a result envelope

Calling compile produces a plan with execute(). A single request returns { ok, data } or { ok: false, error }. Phase requests return nested phase results.

← Your First Policy · Status & Limitations →

Clone this wiki locally