sqlpage

package
v0.0.0-...-2e4c5eb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

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

func Profiles

func Profiles() []hunt.Profile

Profiles is the sqlpage sweep matrix: a balanced set and a denser one (more rows ⇒ more pages ⇒ more continuation resumes per query).

Types

type Result

type Result struct {
	Report *hunt.Report
	Checks int
}

Result is the driver's rich outcome: the hunt.Report plus the number of (query, page-limit) checks.

type Workload

type Workload struct {
	Rows int // rows seeded per table; more rows = more pages = more continuation resumes (default 30)
}

Workload is the SQL-pagination oracle, a hunt.Workload. Self-parameterized; faults off.

func (Workload) Name

func (Workload) Name() string

func (Workload) Run

func (w Workload) Run(seed uint64, _ hunt.Config) *hunt.Report

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL