Commit 3a9e047
docs: add canonical Supported SQL reference (docs/supported-sql.md) (#23)
The README's "Supported SQL" section had grown into an implicit
mini-reference that was missing key facts — most glaringly,
transactions (`BEGIN` / `COMMIT` / `ROLLBACK`) which Phase 4f
shipped months ago. Other gaps: multi-row INSERT, auto-index
naming, read-only mode behavior, three-valued NULL logic, case
sensitivity of identifiers.
Rather than keep patching the README, split the canonical
reference out into its own document:
- **`docs/supported-sql.md`** — strict reference: every
statement with its full grammar, supported types, column
constraints, error conditions, operator table, NULL
semantics, transaction lifecycle, read-only behavior, and
the complete "not yet supported" list organized by
category (joins, aggregation, predicates, DDL,
transactions, query shape, session / schema).
- **`README.md`** — trimmed "Supported SQL" to a
quick-reference summary table that now includes the
`BEGIN` / `COMMIT` / `ROLLBACK` row. Defers to
supported-sql.md for full semantics. The "not yet
implemented" bullet is broader + links to the detailed
list.
- **`docs/usage.md`** — "Supported SQL" section shrunk to a
handful of at-the-REPL tips (one-statement-per-call,
transactions-are-real, case-sensitive identifiers,
NULL-as-false-in-WHERE). Deleted the duplicated
statement-by-statement breakdown, deleted the full
Transactions and Not-Yet-Supported sections — all now
live in supported-sql.md. usage.md stays focused on
"how to use the tool" (REPL, meta-commands, history,
embedding) instead of "what SQL does it speak".
- **`docs/_index.md`** — Supported SQL surfaced in the
"Start here" list as its own entry, between Using SQLRite
and Desktop.
One factual correction landed along the way: the reference
initially claimed identifiers were case-insensitive "normalized
to lowercase at definition time". A quick check of
`Database::contains_table` showed it's a direct `HashMap`
lookup with zero normalization — so `CREATE TABLE Users` +
`SELECT * FROM users` actually errors. Fixed the doc to match
reality and flagged it as something Phase 5's cursor refactor
could revisit.
No engine changes. Pure docs.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 6f59f6e commit 3a9e047
4 files changed
Lines changed: 353 additions & 134 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
127 | 129 | | |
128 | 130 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
134 | 136 | | |
| 137 | + | |
135 | 138 | | |
136 | | - | |
| 139 | + | |
137 | 140 | | |
138 | 141 | | |
139 | | - | |
| 142 | + | |
140 | 143 | | |
141 | 144 | | |
142 | | - | |
| 145 | + | |
143 | 146 | | |
144 | | - | |
| 147 | + | |
145 | 148 | | |
146 | 149 | | |
147 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
0 commit comments