docs: ADR-0036 revised to surgical "validate-and-retain"; +X4/X5 open questions
Narrow ADR-0036 from "bind literals via the DSL path" to "validate literal values (shared validators) + retain them; execute verbatim, keep auto-fill and command identity mode-specific" — after a concrete auto-fill difference (non-PK serial) confirmed the modes aren't identical even for single-row literals. Augments (no longer supersedes) ADR-0030 §4 / ADR-0033 §10; Amendment 3 stands. README + forward-notes on 0030/0033 updated. Records requirements.md X4 (serial auto-fill — possible bug) and X5 (framework cohesion / share-mechanics-not-commands).
This commit is contained in:
@@ -157,17 +157,18 @@ that `docs/simple-mode-limitations.md` records as the inverse
|
||||
of the simple-mode subset. The DSL `Expr` is the *DSL's*
|
||||
representation; the SQL surface does not round-trip through it.
|
||||
|
||||
> **Forward note (2026-05-26).** The **Proposed ADR-0036** narrows the
|
||||
> "DML → validated SQL text" half of this section: **literal data
|
||||
> values** in `INSERT`/`UPDATE` should be parsed to typed `Value`s,
|
||||
> validated, and bound as parameters (as the DSL already does), not
|
||||
> handed to the engine as text — so advanced mode gets the same
|
||||
> value-validation, hinting, highlighting, and error context as simple
|
||||
> mode. The `SELECT` half and the full-expression-surface rationale above
|
||||
> **stand**: expressions and queries remain verbatim text (ADR-0026's
|
||||
> limited `Expr` is *not* imposed on the SQL surface). The dividing line
|
||||
> is "bindable literal vs engine-evaluated expression-or-query." Pending
|
||||
> acceptance.
|
||||
> **Forward note (2026-05-26, ADR-0036 Accepted).** ADR-0036 **augments**
|
||||
> the "DML → validated SQL text" half of this section — it does **not**
|
||||
> change the execution model. Advanced-mode DML still executes verbatim;
|
||||
> what's added is that "validated" now also means *value*-validated: the
|
||||
> **literal data values** in `INSERT`/`UPDATE` are checked against the
|
||||
> playground type system (and retained for error reporting) **before** the
|
||||
> verbatim statement runs, sharing the DSL's per-type validators. No
|
||||
> binding, no reconstruction, no command-identity change (ADR-0033 Am3
|
||||
> stands). The `SELECT` half and the full-expression-surface rationale
|
||||
> above **stand**: expressions and queries remain verbatim text (ADR-0026's
|
||||
> limited `Expr` is *not* imposed on SQL). Dividing line: a static literal
|
||||
> value (validate it) vs an engine-evaluated expression-or-query.
|
||||
|
||||
### 5. Type vocabulary — the playground's, not the engine's
|
||||
|
||||
|
||||
Reference in New Issue
Block a user