x64base

Documentation / Query and relations

Query and relations

One statement surface, checked against SQLite at every step, and two ways to walk a relation graph.

SQLSEL, and what it covers

Runtime-proven SQLSEL runs SELECT over open work areas: selection, projection, WHERE, ORDER BY, LIMIT, and COUNT(*). The word SQL on its own is reserved and runs nothing.

CapabilityProof
SELECT, WHERE, ORDER BY, LIMIT, COUNT(*)Runtime-proven default suite
INNER, LEFT, RIGHT, FULL, CROSS joinsRuntime-proven default suite
Self-joins, compound ON, three-table chainsRuntime-proven explicit run
GROUP BY, HAVING, COUNT/SUM/AVG/MIN/MAXRuntime-proven explicit run
Scalar, IN, EXISTS subqueries, correlated or notRuntime-proven explicit run
DISTINCT, UNION, UNION ALL, INTERSECT, EXCEPTRuntime-proven explicit run
INSERT, UPDATE, DELETE, cross-table transactionsRuntime-proven explicit run
SET PARALLEL partitioned read-only scansRuntime-proven default suite

Default suite means the engine re-proves it on every REGRESSION ALL. Explicit run means a registered spec proves it on demand while it waits for soak and review. Spec names are on the status board.

The referee

Each of those specs compares SQLSEL's row sets with an in-process SQLite implementation. SQLite is compiled in both as a companion carrier and as the referee: competing with it and testing against it are the same decision, made on purpose. The join proofs also assert the path the query took, not only the answer it returned.

One graph, two walkers

Runtime-proven A declared relation graph can be walked positionally -- the child cursor follows the parent, classic SET RELATION -- or as a set through SQLSEL. On 2026-08-10 both answered the same question over a 34-table schema with 58 foreign-key relations and agreed down to the record. The relation store is scoped to its workspace.

A whole database posture in one file

Runtime-proven WORKSPACE SAVE captures open areas, attached indexes, selected orders, aliases, and declared relations into a plain-text snapshot; WORKSPACE LOAD restores it. Several workspaces can be open at once, each owning its own areas and environment.