Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vmvarela/sql-pipe
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.15.0
Choose a base ref
...
head repository: vmvarela/sql-pipe
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.16.0
Choose a head ref
  • 15 commits
  • 21 files changed
  • 3 contributors

Commits on Jun 27, 2026

  1. refactor: deduplicate visual/source helpers, simplify fmtThousands (#182

    )
    
    Three behavior-preserving cleanups:
    
    1. Extract visual.zig — Shared UTF-8 display-width module (visualWidth,
       writeCharRepeated, writeSpaces) used by table.zig and markdown.zig.
       Removed ~170 lines of verbatim duplication. 3 public fns, 4 private helpers.
    
    2. Extract source.zig — Shared openInput() returning SourceFile{file, needs_close}
       with deinit() method. Replaces 9 duplicate file-or-stdin switch blocks
       across columns.zig, sample.zig, and validate.zig.
    
    3. Simplify fmtThousands — Reduced 17-line implementation to 8 lines
       using (digits.len - i) % 3 == 0 instead of first_group calculation.
    
    All tests pass (zig build unit-test + zig build test, exit 0).
    Net: +63 lines, -301 lines (-238 net).
    vmvarela authored Jun 27, 2026
    Configuration menu
    Copy the full SHA
    4ae4fb6 View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2026

  1. chore(deps): bump actions/cache from 5 to 6 (#183)

    Bumps [actions/cache](https://github.com/actions/cache) from 5 to 6.
    - [Release notes](https://github.com/actions/cache/releases)
    - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
    - [Commits](actions/cache@v5...v6)
    
    ---
    updated-dependencies:
    - dependency-name: actions/cache
      dependency-version: '6'
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 30, 2026
    Configuration menu
    Copy the full SHA
    ea5ba30 View commit details
    Browse the repository at this point in the history
  2. feat: add --explain flag for query plan introspection (#166)

    Add --explain flag that runs EXPLAIN QUERY PLAN on the user's SQL query
    and prints the SQLite execution plan to stderr before executing the query.
    Each plan line is prefixed with QUERY PLAN: for readability. The actual
    query still executes normally with results on stdout.
    
    - Add ExplainWithFlags error, explain field, parsing, and mutual exclusion
      in src/args.zig
    - Add printQueryPlan() helper and wiring in src/main.zig
    - 11 integration tests in build.zig covering basic usage, stdout cleanliness,
      exit codes, mutual exclusion with all mode flags, nonexistent table error,
      query file support, and empty stdin
    - Update README.md and docs/sql-pipe.1.scd with flag documentation
    vmvarela committed Jun 30, 2026
    Configuration menu
    Copy the full SHA
    41b5534 View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2026

  1. feat: add SQL INSERT output format (-O sql)

    Add -O sql output format that generates INSERT INTO statements per row,
    with --sql-table flag for custom table name.
    
    - OutputFormat.sql enum variant in format.zig
    - writeSqlRow() with identifier quoting, string literal escaping,
      NULL handling, float truncation (matching JSON pattern)
    - --sql-table flag parsing in args.zig (default: "t")
    - sql_table wired through execQuery → OutputWriter
    - 9 integration tests covering basic, custom table, escaping,
      NULL, numeric, float, empty, quoted columns, quoted table
    - README.md and man page updated
    vmvarela committed Jul 1, 2026
    Configuration menu
    Copy the full SHA
    93a38a5 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2026

  1. feat: add --null-value flag for custom NULL representation

    Implement a --null-value flag that lets users control how SQL NULL values
    are rendered in CSV, TSV, and table output, while preserving native null
    in JSON output.
    
    - Parse --null-value in args.zig (--null-value <string>, --null-value=<string>)
    - Thread null_value through format.zig, main.zig, table.zig, markdown.zig, xml.zig
    - CSV/TSV renders null_value or default "NULL"
    - Table output renders null_value or default "NULL"
    - Markdown output uses null_value (default empty string)
    - JSON always uses native null (flag has no effect)
    - 122-line integration tests in build.zig covering CSV default, custom, and empty
    - Update help text, README, and man page
    
    Closes #170
    vmvarela authored Jul 3, 2026
    Configuration menu
    Copy the full SHA
    fd377b4 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'master' into issue-166/explain-flag

    Victor M. Varela committed Jul 3, 2026
    Configuration menu
    Copy the full SHA
    80babac View commit details
    Browse the repository at this point in the history
  3. feat: add --explain flag for query plan introspection (#185)

    Victor M. Varela committed Jul 3, 2026
    Configuration menu
    Copy the full SHA
    9b136b9 View commit details
    Browse the repository at this point in the history
  4. feat: add --schema flag to print inferred CREATE TABLE DDL (issue #176)

    vmvarela authored and Victor M. Varela committed Jul 3, 2026
    Configuration menu
    Copy the full SHA
    95230f4 View commit details
    Browse the repository at this point in the history
  5. resolve merge conflicts: keep sql-table (PR) + explain + null-value (…

    …master)
    Victor M. Varela committed Jul 3, 2026
    Configuration menu
    Copy the full SHA
    4faed23 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    009376f View commit details
    Browse the repository at this point in the history
  7. feat: add HTML table output format (-O html) (issue #173)

    Add html to the output format list. Render SQL query results as an
    HTML <table> element with optional <thead> and CSS class support.
    
    - Add html variant to OutputFormat enum
    - Implement streaming HTML writer in OutputWriter (begin/writeRow/end)
    - HTML-escape all cell values, column names, and class attributes
      via writeXmlEscaped (reused from xml.zig)
    - NULL values render as empty cells, custom via --null-value
    - --header controls <thead> section
    - --html-class <class> sets CSS class on <table>
    - Update README.md flags table
    - Update docs/sql-pipe.1.scd (options + examples)
    - 8 integration tests
    
    Closes #173
    Victor M. Varela committed Jul 3, 2026
    Configuration menu
    Copy the full SHA
    1722851 View commit details
    Browse the repository at this point in the history
  8. feat: add --completions flag for shell completion generation (issue #175

    )
    
    Generates self-contained shell completion scripts for bash, zsh, and fish.
    
    - New module src/completions.zig with generators for all three shells
    - bash: _sql-pipe() function via _init_completion + compgen
    - zsh: #compdef script with _arguments specs
    - fish: complete -c entries for every flag
    - Includes completions for -I/-O format values and --completions shell values
    - Integration tests with syntax validation (bash -n, zsh -n, fish --no-execute)
    Victor M. Varela committed Jul 3, 2026
    Configuration menu
    Copy the full SHA
    ac925fd View commit details
    Browse the repository at this point in the history
  9. feat: add --completions flag for shell completion generation (#175)

    Adds --completions <shell> flag generating bash, zsh, fish completion scripts. Closes #175.
    vmvarela authored Jul 3, 2026
    Configuration menu
    Copy the full SHA
    6c9d231 View commit details
    Browse the repository at this point in the history
  10. fix: BLOB hex encoding in SQL output + full Unicode width tables

    - Add BLOB hex encoding (X'...') in SQL INSERT output instead of
      silent NULL conversion (issue in writeSqlRow else branch)
    - Handle zero-length BLOB quirk: check column_bytes() before
      column_blob() pointer (null for empty blobs)
    - Integration tests for BLOB round-trip (174j) and empty BLOB (174k)
    
    - Replace 4-range isWideCodepoint() with comprehensive sorted
      [2]u21 range table + binary search (~80 ranges)
    - Covers CJK A-H, Hiragana/Katakana, Hangul, Yi, Fullwidth,
      Emoji (terminal convention, noted)
    - Fix 3 incorrect expected values in existing visual tests
    - Add tests for Hiragana, Katakana, and emoji width
    Victor M. Varela committed Jul 3, 2026
    Configuration menu
    Copy the full SHA
    a2def5b View commit details
    Browse the repository at this point in the history
  11. Merge pull request #190 from vmvarela/fix/v0.15.0-review-fixes

    fix: BLOB hex encoding in SQL output + full Unicode width tables
    Victor M. Varela committed Jul 3, 2026
    Configuration menu
    Copy the full SHA
    10013f7 View commit details
    Browse the repository at this point in the history
Loading