Documentation
¶
Overview ¶
Package sqlpage is RFC-199 Tier 2's SQL-query pagination oracle.
The continuation driver (pkg/simfdb/hunt/continuation) paginates RAW record and index scans. This one goes a layer up: it paginates whole SQL QUERIES — filter, ORDER BY, GROUP BY, DISTINCT, joins — so the executor's cursor tree (and its per-operator continuation logic) is what's under test. That is where a subtle bug like the FlatMap mid-inner continuation drop lived: a correlated join where one outer row matches several inner rows, resumed mid-inner, silently dropped rows.
The oracle is metamorphic — the engine judges itself, no external reference. It runs each query twice on one pinned connection: once with the execution scanned-rows limit at its default (no pagination — the REFERENCE), once with a tiny limit that forces the executor to exhaust its budget and resume through an internal continuation many times over. The two results must be identical (multiset, or ordered for a total-ordered query). A divergence is a continuation DROP or DUPLICATE in some operator's resume path.
Deterministic over SimFDB: a fixed database path (the path is baked into keys), a unique backend cache key per run (an atomic counter), a single SQL connection (SetMaxOpenConns(1) — no pool races), and faults off. Same seed ⇒ same data ⇒ same verdict.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Result ¶
Result is the driver's rich outcome: the hunt.Report plus the number of (query, page-limit) checks.