CLI options, init and clean shutdown
The existing scaffold recognizes only a subset. Import options -f/-t are IMPORT-002. --data-dir is a recommended team extension, not a course flag.
Contract
| Field | Value |
|---|---|
| Specification | CLI-001 |
| 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 |
Interface
main(argv); Database.open(root); Database.close()
These are proposed C++ design contracts, not an already implemented API. Shared types and ownership define the intended module boundaries.
Dependencies
Acceptance checklist
- [ ] Support -b/--batch, -d/--database and --init; exit and EOF flush dirty state
- [ ] --init clears only the selected database data root, never datasets or source
- [ ] Return a clear error for bad arguments; document data root selection
Input
./dbs -b -d demo
Expected output
No prompts or startup banners on stdout.
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
- Unknown option -> stderr and nonzero exit
- Missing selected database -> !ERROR result
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.