Skip to content

DQL CLI enhancements: export formats, pager, import, delete-store, diagnostics + manual testing checklists - #3

Merged
Aaron LaBeau (biozal) merged 4 commits into
mainfrom
enchancements
Sep 3, 2026
Merged

DQL CLI enhancements: export formats, pager, import, delete-store, diagnostics + manual testing checklists#3
Aaron LaBeau (biozal) merged 4 commits into
mainfrom
enchancements

Conversation

@biozal

@biozal Aaron LaBeau (biozal) commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

What

A batch of manually-tested dittosh dql enhancements (2 commits, +3,215 lines), plus full manual testing checklists.

Output formats & rendering

  • New renderers: HTML (styled, zebra rows, sticky header), markdown (GFM), vertical record blocks
  • Tables now fit the terminal width on a TTY (ellipsized values, right-aligned numbers); pipes/files keep full fidelity
  • -o/--out file export with format inference from extension (--format overrides); rejected for mutations/DDL and multi-statement batches
  • Pager: long results page through $PAGER/less on a TTY; opt out via --no-pager or DITTOSH_NO_PAGER

New commands

  • dittosh dql import <file> <collection> — JSON array or NDJSON, upsert batches (ON ID CONFLICT DO UPDATE), --batch-size, generated UUIDs for docs without _id
  • dittosh dql delete-store — removes the whole data directory; refuses without -y, lock-aware (exit 4), refuses non-store targets

Diagnostics (dql exec flags)

  • --timeTime: N ms footer on stderr (per statement in batches; server elapsed/parse/plan breakdown with --profile)
  • --explain, --profile, --advise / --apply / -y
  • ADVISE output now prints a copy-pasteable apply with: command with the analyzed statement shell-quoted inline
  • Parameter binding: -p/--param (repeatable) and --args (inline JSON, - stdin, @file)

Manual testing checklists

  • manualTesting.retail.md (14 sections) and manualTesting.retail-joins.md (17 sections) — full-surface, copy-pasteable checklists covering every feature above plus housekeeping commands, REPL, jq pipelines, and exit codes. The retail-joins file centers on the JOIN story: joins to large collections require indexes → ADVISE recommends them → apply → re-run (25 reserved customers, 24 inventory holes, per-store order counts).

Supporting changes

  • scripts/install-release.sh — stamp token → release build → global install
  • README/AGENTS.md updates, .gitignore for build artifacts
  • Tests: new unit + e2e coverage for import, delete-store, all new renderers, and the pager; updates across existing suites

Verification

  • Every command/Expect value in both checklists verified live against freshly loaded default-scale retail and retail-joins stores (row counts, pager line counts 75,002/60,002, exact error texts, exit codes 0/1/2/4)
  • Unit tests pass locally; integration/e2e are credential-gated

Draft: checklists pending one full end-to-end pass against a release build.

Split manualTesting.md (untracked) into two standalone, full-surface
checklists — one per dataset. The retail-joins file centers on JOINs:
index-free small-RHS joins, the 'join needs an index' error → ADVISE →
apply flow (25 reserved customers, 24 Seattle inventory holes, per-store
order counts), join aggregates, and the stock_value known issue. All
Expect values verified live against freshly loaded default-scale stores.
@biozal Aaron LaBeau (biozal) self-assigned this Sep 3, 2026
@biozal
Aaron LaBeau (biozal) marked this pull request as ready for review September 3, 2026 02:34
… flags

- renderers: html, markdown, vertical, columns; terminal-width table fitting
- pager (less/less, --no-pager, DITTOSH_NO_PAGER)
- dql import (JSON array / NDJSON, upsert batches) and dql delete-store (-y, lock-aware)
- dql exec flags: --time, --explain, --profile, --advise/--apply, -o/--out
- advise: copy-pasteable apply-with line (interpolates the analyzed statement, shell-quoted)
- params: -p/--param and --args (inline/-/@file)
- release install script, docs, and unit/integration/e2e coverage

All manually tested (see manualTesting.*.md).
Comment thread src/render/markdown.ts Fixed
@biozal Aaron LaBeau (biozal) changed the title Add manual testing checklists for retail and retail-joins datasets DQL CLI enhancements: export formats, pager, import, delete-store, diagnostics + manual testing checklists Sep 3, 2026
Incomplete string escaping (js/incomplete-string-escaping): a data backslash
(e.g. a Windows path, or \| before a pipe) could corrupt the GFM table.
Escape \ first, then |, then newlines. Unit test pins the ordering.
@biozal
Aaron LaBeau (biozal) merged commit 574ce37 into main Sep 3, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants