querypipe
Reference

ADR index

All eleven architecture decision records, with one-line summaries and links to the full texts.

Every architectural decision is recorded as an ADR in the repository — read them to understand why the spec looks the way it does. When a decision is ambiguous, the priority order is: (1) Java portability → (2) type safety → (3) bundle size → (4) API ergonomics.

ADRTitleIn one line
0001Canonical QuerySpec model & kind-discriminated FilterNode ASTOne frozen JSON shape; groups reserved in the AST from day one so v0.3 changes zero wire bytes.
0002Immutable builder & progressive sort semanticsEvery method returns a new frozen query; thenSort never disturbs existing priorities.
0003Result-based structured errors; no-throw data pathData errors return a multi-error Result; only programmer misuse throws TypeError.
0004Adapter interface contract (reserved for v0.2)Adapters must match client apply exactly: parametrized values, tie-breaker parity, Result-typed totality.
0005Deterministic tie-breaker (stableBy) injectionA unique sortable field is appended at execution time — never into the spec — making every order total.
0006Guard limits & injection safetyWhitelist + limits on sort columns, filters, value length and in-lists; no user input becomes a pattern.
0007Canonical string format: escaping & canonicalizationSix-character escape set, fixed segment order, lenient-in/canonical-out, idempotence law.
0008Reference comparator: SQL ORDER BY model & NULL semanticsPostgreSQL NULL rules as the single model shared by client apply and all future adapters.
0009Optional value validation via Standard SchemaZod/Valibot/ArkType plug in through the dependency-free ~standard interface; sync-only in v0.1.
0010Syntax dialect plugin interface (reserved for v0.2)Foreign syntaxes (page=, JSON:API, OData) translate at the boundary into the same canonical spec.
0011Java portability constraintsEverything must deserialize into sealed Java types from the same JSON and produce byte-identical canonical strings.

Related normative documents: