Added
- #601, #615, #628, #629, #640: New
SLQstring-matching functions. See Query Guide for per-driver behavior and SQLite ASCII-CI quirks.- Case-sensitive literal substring matchers
contains,startswith, andendswith. - Case-insensitive variants
icontains,istartswith, andiendswith. - User-controlled wildcard matchers
likeandilike:%and_are wildcards.
- Case-sensitive literal substring matchers
- #648:
sq inspectnow has--markdownand--htmloutput formats that generate schema documents with embedded entity relationship diagrams.- #658:
sq inspectalso gained amermaid-erdoutput format (--format=mermaid-erd) that emits the bare Mermaid entity-relationship diagram source for source and table schema inspection, with no surrounding document.
- #658:
Changed
- #637: Richer
SLQsyntax-error reporting in both text and JSON error formats. You can set the new config optionerror.format.text.verbosetofalseif you prefer the previous (less-verbose)texterror format.
- #617, #618:
sq inspectnow omits an index whose key positions are all expressions (previously MySQL and SQLite reported such an index with an emptycolumnslist).
Fixed
- #617, #618:
sq inspectnow preserves the true key arity and position of indexes that contain functional/expression keys. A key likelower(b)inCREATE INDEX ix ON t (a, lower(b), c)is reported as an empty-string entry in the index'scolumns, so it is no longer indistinguishable from a real two-column(a, c). Applies to SQLite, DuckDB, MySQL, and Postgres. - #612: DuckDB
INTERVALvalues 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μsstring. - #613:
sq inspectof 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.Timewhen aDATETIME/DATEcolumn stores text thatmattn/go-sqlite3doesn't natively convert — most commonly Rails' microsecond-precisiondatetime(6)columns.sqnow 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 forsq diffwas being applied to every command's--formatflag; it's now scoped tosq diffitself. - #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:
--insertinto 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:aliasform on the left of a pipeline (e.g.@sakila.actor:a | .a.first_name) no longer silently collapses toSELECT * FROM <table>. - #646: A query whose alias is a reserved word (e.g.
.actor | .first_name:count,@sakila.actor:count, orjoin(.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
joinno longer fails when the participating sources contain tables with the same name (e.g.@src1.actor | join(@src2.actor, .actor_id)).