Skip to content

feat: print row count after loading CSV (#83)#111

Merged
vmvarela merged 2 commits intomasterfrom
issue-83/print-row-count
Apr 29, 2026
Merged

feat: print row count after loading CSV (#83)#111
vmvarela merged 2 commits intomasterfrom
issue-83/print-row-count

Conversation

@vmvarela
Copy link
Copy Markdown
Owner

Summary

  • Adds --verbose / -v flag that prints Loaded <n> rows to stderr after all CSV rows are inserted
  • Without the flag, the message is shown automatically when stderr is a TTY (interactive terminal) and suppressed in scripts/pipes
  • Row count uses thousands separators for readability (e.g. 42,317 not 42317)

Details

  • Uses std.Io.File.isTty(std.Io.File.stderr(), io) for TTY detection
  • Adds fmtThousands helper with Pre/Post spec and loop invariant comment
  • Updates --help output and README flags table + prose description
  • 4 new integration tests (29–32): basic count, thousands separator, non-verbose silence, -v alias

Closes #83

Add --verbose / -v flag and automatic TTY detection so users can confirm
how many rows were ingested. Prints 'Loaded <n> rows' to stderr (never
stdout) after the COMMIT, with thousands separators for readability.
Output is suppressed automatically in non-interactive pipelines unless
--verbose is passed explicitly.
@github-actions github-actions Bot added type:feature New functionality type:chore Maintenance, refactoring, tooling type:docs Documentation only labels Apr 29, 2026
- fmtThousands: tmp buf [20]u8 → [32]u8 for safety margin on edge cases
- printUsage: clarify --verbose description wording
- build.zig test 31: add comment explaining 2>&1 >/dev/null redirect semantics
@vmvarela vmvarela merged commit 5446b86 into master Apr 29, 2026
4 checks passed
@vmvarela vmvarela deleted the issue-83/print-row-count branch April 29, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:chore Maintenance, refactoring, tooling type:docs Documentation only type:feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Print row count loaded from stdin

1 participant