github neilotoole/sq v0.54.0

6 hours ago

Added

  • 🐥 #444: New driver for rqlite, the lightweight distributed database built on SQLite.
  • #441: Revamped secrets handling. Source credentials no longer need to live as plaintext in sq.yml: source locations accept ${scheme:path} placeholders that are resolved at connect time, and secrets are consistently redacted in output unless you opt in to disclosure.
    • #714: Supported placeholder resolvers:
      • OS keychain: ${keyring:3d28xd3jcr}
      • Environment variables: ${env:DB_PASSWORD}
      • File contents: ${file:/run/secrets/db_pw}
      • 1Password: ${op://Private/sakila/dsn}
    • #717, #729: New global flags:
      • --reveal: show secret values in output; supersedes the now-deprecated --no-redact.
      • --expand: print resolved placeholder values instead of the verbatim ${scheme:path} text.
    • #716: sq config export dumps the active config to YAML, primarily for backups. With --expand, placeholders are resolved in-line, making the export a self-contained (but plaintext) snapshot.
  • #660: sq inspect gained svg-erd and png-erd output formats that render the schema ERD directly to .svg or .png image files.
  • #846: New format.decimal option and --format.decimal flag (string | number) controlling whether decimal values render as quoted strings or bare numbers in JSON and YAML output.

Changed

  • #851: In colored output, structural punctuation is now rendered muted rather than bold, so values stand out.
  • #846: YAML now renders decimal values as quoted strings by default, matching JSON. Set format.decimal=number to restore bare numbers.
  • ☢️ #594: avg() now returns a consistent float on every SQL driver. Breaking for Postgres and MySQL, which previously returned a lossless decimal.
  • ☢️ #839, #853: sum() over an integer or decimal column now returns a consistent decimal on every SQL driver, rendered in JSON as a quoted string (e.g. "20100").
  • #610: The DuckDB driver now opens sources read-only for non-writing commands, and sq sql gained a --readonly (alias --ro) flag.
  • ☢️ #728, #782: The redact config option is renamed to secrets.reveal with inverted polarity; existing configs are migrated automatically (after a backup).
  • #692: sq inspect -f mermaid-erd now syntax-colors its erDiagram source when writing to a terminal.
  • #758: For SQLite (and rqlite) sources, sq tbl copy now copies the source table's indexes and triggers to the destination.

Fixed

  • #851: Two fixes to yaml output: a numeric value from an untyped column is now colorized, and a BLOB value is now encoded as base64.
  • #844: On Oracle, a query whose result is a computed NUMBER with a fractional value no longer fails with a scan error; such numbers are now typed as decimal.
  • #594: On SQL Server, avg() over an integer column no longer performs integer division and truncates the result.
  • #741, #743: sq add shell completion now supports ClickHouse and Oracle.
  • #699: sq inspect on SQLite sources no longer executes pragmas that write to the database or scan the whole file, which could make each inspect painfully slow.
  • #720: Fixed SQLite driver path handling for source locations with connection params (e.g. sqlite3:///path/to/db?mode=ro).
  • #750, #752, #757, #759: A batch of fixes to the CREATE TABLE DDL rewriting that backs table copy and column-kind alteration on the sqlite3 driver.
  • #783: sq db dump cluster no longer writes the database password to the sq log file.
  • #783: sq cache clear @src now clears every cache dir belonging to the source, including stale dirs left over from a changed location, schema, or ingest options.
  • #783: sq add and sq mv no longer permit a source handle nested below an existing source's handle.
  • #821: On the SQLite and rqlite drivers, renaming a table, adding a column, or truncating it no longer fails when a table or column name contains a double quote.
  • #834: On the ClickHouse driver, a result-column name containing a dot is no longer truncated to the segment after the last dot.

Full Changelog: v0.53.0...v0.54.0

Don't miss a new sq release

NewReleases is sending notifications on new releases.