docs: ADR-0030 — advanced mode standard-SQL surface
Decides the architecture for SQL in advanced mode (Q1/Q2/Q4): SQL is authored as grammar within the unified grammar tree (ADR-0024) and parsed by the existing walker — not a separate batch parser — so SQL gets the same completion, highlighting, hints, and parse-error reporting as the DSL. Mode gates the SQL forms. DDL routes through the typed Command executor (metadata and the playground type vocabulary preserved); DML and SELECT execute as validated SQL. Engine-neutral posture; DSL→SQL teaching echo; phased plan. Supersedes ADR-0001's sqlparser-rs reservation. Ticks Q4; updates the ADR index and the Q1/Q2 notes. handoff-24 orients the implementation session at Phase 1.
This commit is contained in:
+20
-4
@@ -196,15 +196,31 @@ handoff-14 cleanup; 449 after B2/C2.)
|
||||
|
||||
- [ ] **Q1** SQL parsed via `sqlparser-rs`; supported subset is
|
||||
defined (specifics deferred to a future ADR).
|
||||
*(Progress: DSL is parsed via `chumsky` (ADR-0009); SQL
|
||||
handling in advanced mode is still a placeholder echo.)*
|
||||
*(Progress: SQL handling in advanced mode is still a
|
||||
placeholder echo. The architecture is now decided — ADR-0030:
|
||||
SQL is authored as grammar within the unified grammar tree
|
||||
(ADR-0024) and parsed by the existing walker, **not** a
|
||||
separate batch parser — so SQL gets the same completion /
|
||||
highlighting / hints as the DSL. ADR-0001's `sqlparser-rs`
|
||||
reservation is superseded. Implementation is phased and
|
||||
pending.)*
|
||||
- [ ] **Q2** Non-standard syntax rejected with a clear message
|
||||
pointing at the supported subset.
|
||||
*(Design done — ADR-0030 §8: out-of-subset statements are
|
||||
refused with an engine-neutral message naming the construct.
|
||||
Implementation pending.)*
|
||||
- [x] **Q3** User-facing simplified types map transparently to
|
||||
SQLite STRICT types in generated DDL. *(All ten types implemented
|
||||
and tested.)*
|
||||
- [~] **Q4** Supported SQL subset specification — design and ADR
|
||||
pending. Q1 cannot be marked satisfied without it.
|
||||
- [x] **Q4** Supported SQL subset specification — **ADR-0030**.
|
||||
Advanced mode is a standard-SQL surface, engine-neutral; the
|
||||
supported surface — `SELECT` (full query surface),
|
||||
`INSERT` / `UPDATE` / `DELETE`, `CREATE` / `DROP` / `ALTER
|
||||
TABLE`, `CREATE` / `DROP INDEX` — is authored as grammar in
|
||||
the unified tree. DDL routes through the typed `Command`
|
||||
executor (metadata + the playground type vocabulary
|
||||
preserved); DML and `SELECT` execute as validated SQL. Q1's
|
||||
implementation is now unblocked.
|
||||
|
||||
## Database backend (per ADR-0002)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user