Context
SQLite errors on typos are terse: no such column: emial. The tool knows the real column list (already exposed via getTableColumns / PRAGMA table_info), so a Levenshtein suggestion is cheap and saves a round trip to --columns. #197 already contemplates the same mechanism for parameter names.
Proposed behavior
$ sql-pipe data.csv 'SELECT emial FROM t'
error: no such column: emial
hint: did you mean 'email'?
- On SQLite
no such column: X / no such table: X errors, look up known names and suggest the closest match within edit distance ≤ 2 (scaled for short names).
- Print hint to stderr after the error; exit code unchanged.
Scope (v1)
Excluded (YAGNI)
- Suggesting SQL keywords or functions
- Multiple suggestions (one best match is enough)
- Fuzzy auto-correction (hint only, never rewrite the query)
Acceptance criteria
Context
SQLite errors on typos are terse:
no such column: emial. The tool knows the real column list (already exposed viagetTableColumns/PRAGMA table_info), so a Levenshtein suggestion is cheap and saves a round trip to--columns. #197 already contemplates the same mechanism for parameter names.Proposed behavior
no such column: X/no such table: Xerrors, look up known names and suggest the closest match within edit distance ≤ 2 (scaled for short names).Scope (v1)
--paramnames.Excluded (YAGNI)
Acceptance criteria