Documentation / CLI-003
Issue boardGitLab source
CLI-003 Planned contract

Batch CSV formatting and immediate flush

The example uses unqualified SELECT headers; qualified headers are also permitted by the official frontend. No general HTTP endpoints are part of this engine.

Contract

Field Value
Specification CLI-003
Module frontend
Scope Required implementation or delivery
Milestone M1, due 2026-12-06
Owner role SQL / frontend — teammate to claim
Implementation Planned; scaffold only
Contract review Team review required before implementation

Open GitLab issue

Interface

ResultWriter.write(Result, Mode::Batch)

These are proposed C++ design contracts, not an already implemented API. Shared types and ownership define the intended module boundaries.

Dependencies

Acceptance checklist

  • [ ] Output simplified CSV, no prompt, one @ line per SQL then flush stdout
  • [ ] SHOW headers are DATABASES/TABLES; mutations use rows; FLOAT has two decimal places
  • [ ] Empty results still emit headers; DESC blank line and constraint sections follow contract

Setup data

Run this in a fresh isolated data directory before the example. Setup commands emit their own results; the expected block below covers only the listed input.

CREATE DATABASE demo;
USE demo;
CREATE TABLE people (id INT NOT NULL, name VARCHAR(16) NOT NULL, score FLOAT NOT NULL);
INSERT INTO people VALUES (1, 'Ada', 90.5), (2, 'Lin', 80.0);

Input

SELECT name, score FROM people WHERE id = 1;

Expected output

name,score
Ada,90.50
@

Where no ORDER BY appears, row order is not guaranteed. Error message text is illustrative; required diagnostic keywords and result framing are binding.

Rejections and state

  • Constraint failures use !ERROR then one diagnostic then @

Verification

Completion rule

Link this spec and its GitLab issue in an MR into develop. Include relevant Linux evidence, obtain the other teammate’s review, merge, delete the feature branch, and close the issue. A page describes intended behavior; the GitLab issue and merged code determine completion.

DBS 005 · Specification v1 · Team review required for proposed interfaces.
Engine behavior is planned; implementation progress lives in GitLab.