Part of #17. Design: [`docs/design.md`](https://github.com/DarkCollective/relix-cli/blob/develop/docs/design.md) §3.3, §3.4, §3.6. ## Scope - **Choosing a format.** `-o/--output` and `RELIX_OUTPUT`. With neither, a terminal gets `table` and anything else gets `tsv`. - **Modifiers:** - `--no-header` (csv/tsv) - `--null=STRING` - `--color=auto|always|never`, honouring `NO_COLOR` - `--line-buffered` - **Several queries in one script:** - `table` prints each, labelled. - A machine format prints the **last** query, or the one named by `--query=NAME` (no short form: `-q` is `--quiet`, defined in S1). - `--all` with `ndjson` tags each row `"_query": NAME`. `--all` with any other machine format is a usage error. - **Assertions:** `--fail-empty` / `--fail-rows` exit 1. - **Pipe discipline:** - An EPIPE-aware `RowSink` closes the `Stream<Tuple>` on a write failure and exits 141 silently. - A SIGINT shutdown hook closes the active stream and the session, then exits 130. - Output goes through a buffered stdout, flushed per result set. ## Dependencies - S1 (#4), S2a (#5) for the TSV and NDJSON renderers. - Full cancellation of in-flight JDBC/HTTP work on close is DarkCollective/relix-core#83. This slice closes the stream either way. ## Acceptance - A sink that fails after N rows: assert the stream was closed and at most N+1 rows were pulled. This is a count, not a time. - `-e 'Naturals' | head`-style termination is tested. - The isatty default is tested both ways.
Activity
Choose the output format, and end a run cleanly at a closed pipe or a…
github-actions commentedon Oct 8, 2026
Done in #34, merged to develop (07435ac).
Choose the output format, and end a run cleanly at a closed pipe or a…