Description
The current -d / --delimiter flag accepts only a single character. Several common real-world formats use multi-character separators (e.g. ||, ;; , <TAB><TAB>, or even fixed-width delimiters). Extending delimiter support to strings would unlock these data sources without extra preprocessing.
Example
$ cat data.psv | sql-pipe -d '||' 'SELECT * FROM t'
$ cat report.txt | sql-pipe --delimiter ' ' 'SELECT * FROM t' # two spaces
Acceptance Criteria
Notes
- Current parser in
src/csv.zig assumes single-byte delimiter — will need refactoring
- Quoting/escaping semantics: if field contains the multi-char delimiter, it must be quoted (RFC 4180 extended)
- Consider KMP or simple
std.mem.indexOf for delimiter scanning
Description
The current
-d/--delimiterflag accepts only a single character. Several common real-world formats use multi-character separators (e.g.||,;;,<TAB><TAB>, or even fixed-width delimiters). Extending delimiter support to strings would unlock these data sources without extra preprocessing.Example
Acceptance Criteria
-d/--delimiteraccepts strings of 1 or more characters (current single-char still works)--tsvremains a shorthand for--delimiter $'\t'(single char, unchanged)--help, README.md, anddocs/sql-pipe.1.scdNotes
src/csv.zigassumes single-byte delimiter — will need refactoringstd.mem.indexOffor delimiter scanning