github neilotoole/sq v0.53.0

3 hours ago

Added

Changed

  • #637: Richer SLQ syntax-error reporting in both text and JSON error formats. You can set the new config option error.format.text.verbose to false if you prefer the previous (less-verbose) text error format.
  • #617, #618: sq inspect now omits an index whose key positions are all expressions (previously MySQL and SQLite reported such an index with an empty columns list).

Fixed

  • #617, #618: sq inspect now preserves the true key arity and position of indexes that contain functional/expression keys. A key like lower(b) in CREATE INDEX ix ON t (a, lower(b), c) is reported as an empty-string entry in the index's columns, so it is no longer indistinguishable from a real two-column (a, c). Applies to SQLite, DuckDB, MySQL, and Postgres.
  • #612: DuckDB INTERVAL values now render in DuckDB's native, round-trippable text form (e.g. 1 year 2 months 3 days 04:05:06.789) instead of the previous ad-hoc Go-style μs string.
  • #613: sq inspect of a SQL Server source no longer returns tables from schemas other than the source's current schema.
  • #471: The SQLite driver no longer fails with unsupported Scan, storing driver.Value type string into type *time.Time when a DATETIME/DATE column stores text that mattn/go-sqlite3 doesn't natively convert — most commonly Rails' microsecond-precision datetime(6) columns. sq now re-runs the same timestamp parse and falls back to the raw text only when the value is genuinely unparseable.
  • #658: sq <command> --format=FORMAT (e.g. sq inspect --format=xlsx) no longer fails with a spurious "diff does not support output format" error. The format check for sq diff was being applied to every command's --format flag; it's now scoped to sq diff itself.
  • #652: The ClickHouse driver now creates a copied table in its target schema (ClickHouse database) when the copy specifies one, rather than always in the connection's current database.
  • #484: --insert into a MySQL or Postgres table no longer fails when a same-named table exists in another schema.
  • #633: A query using the single-segment @handle.table:alias form on the left of a pipeline (e.g. @sakila.actor:a | .a.first_name) no longer silently collapses to SELECT * FROM <table>.
  • #646: A query whose alias is a reserved word (e.g. .actor | .first_name:count, @sakila.actor:count, or join(.film_actor:count, ...)) now applies that alias instead of silently dropping it. An alias that is an argument reference (e.g. :$x) is now rejected with a clear error rather than silently discarded.
  • #445: Cross-source join no longer fails when the participating sources contain tables with the same name (e.g. @src1.actor | join(@src2.actor, .actor_id)).

Don't miss a new sq release

NewReleases is sending notifications on new releases.