v1.14.0
v1.14.0 — Dialect-Aware Transforms, Snowflake 100%, Schema Introspection
Headline themes: dialect-aware transforms, Snowflake at 100% of the QA corpus, ClickHouse significantly expanded (83% of the QA corpus, up from 53%), live schema introspection, SQL transpilation, and first-class integration sub-modules (OpenTelemetry and GORM). Drop-in upgrade from v1.13.0 — no breaking changes.
Added
Dialect-aware formatting (closes #479)
transform.FormatSQLWithDialect(stmt, keywords.SQLDialect): renders an AST using dialect-specific row-limiting syntax —SELECT TOP nfor SQL Server,FETCH FIRST n ROWS ONLYfor Oracle,LIMIT nfor PostgreSQL/MySQL/SQLite/Snowflake/ClickHouse/MariaDBtransform.ParseSQLWithDialect(sql, keywords.SQLDialect): dialect-aware parsing convenience wrapperFormatOptions.Dialectfield threads dialect through the formatter pipelinenormalizeSelectForDialect()convertsLimit/OffsetintoTopClause(SQL Server) orFetchClause(Oracle) on a shallow copy — original AST never mutated- Parsed
TopClausenow renders (previously silently dropped — a long-standing bug) - SQL Server pagination:
OFFSET m ROWS FETCH NEXT n ROWS ONLYwhen both limit and offset are set - PR #507
Snowflake dialect (100% QA corpus — 87/87 queries, epic #483)
MATCH_RECOGNIZEclause (SQL:2016 R010): PARTITION BY, ORDER BY, MEASURES, ONE/ALL ROWS PER MATCH, AFTER MATCH SKIP, PATTERN, DEFINE (PR #506)@stagereferences in FROM clause with optional path and file format (PR #505)MINUSas EXCEPT synonym for Snowflake/Oracle (PR #494); fix for MINUS-as-alias edge case (PR #504)SAMPLE/TABLESAMPLEclause with BERNOULLI/ROW/SYSTEM/BLOCK methods (PR #501)QUALIFYclause for window-function filtering (Snowflake/BigQuery) (PR #490)- VARIANT colon-path expressions (
expr:field.sub[0]) (PR #496) - Time-travel
AT/BEFORE/CHANGESon table references (PR #495) LATERAL FLATTENtable function + named arguments (name => expr) (PR #492)TRY_CAST+IGNORE NULLS/RESPECT NULLSfor window functions (PR #486)LIKE ANY/LIKE ALLandILIKE ANY/ILIKE ALLquantifiers (PR #500)USE [WAREHOUSE|DATABASE|SCHEMA|ROLE]andDESCRIBEwith object-kind prefixes (PR #491)COPY INTO,PUT,GET,LIST,REMOVEparse-only stubs (PR #499)CREATE STAGE/STREAM/TASK/PIPE/FILE FORMAT/WAREHOUSE/DATABASE/SCHEMA/ROLE/SEQUENCE/FUNCTION/PROCEDUREparse-only stubs (PR #498)CLUSTER BY,COPY GRANTS, and CTAS (CREATE TABLE ... AS SELECT) for CREATE TABLE (PR #504)ILIKE+ PIVOT/UNPIVOT support for Snowflake dialect (PR #484)
ClickHouse dialect (69/83 QA corpus — 83%, up from 53% in v1.13.0, epic #482)
- Remaining ClickHouse QA gaps (tracked for v1.15): ARRAY JOIN / LEFT ARRAY JOIN, LIMIT n,m BY, named window definitions, scalar CTE subqueries, CREATE MATERIALIZED VIEW / DISTRIBUTED TABLE, SAMPLE with decimal and OFFSET, standalone SELECT ... SETTINGS without preceding FROM/WHERE
- Reserved-word identifiers:
table,partition,tables,databasesnow valid as column/identifier names (closes #480, PR #481) - Nested column types:
Nullable(T),Array(T),Map(K,V),LowCardinality(T)in CREATE TABLE (PR #488) - Engine clauses:
MergeTree(),ORDER BY,PARTITION BY,PRIMARY KEY,SAMPLE BY,TTL,SETTINGS(PR #488) - Parametric aggregates:
quantile(0.95)(duration)double-paren syntax (PR #487) - Bare-bracket array literals:
[1, 2, 3]without ARRAY keyword (PR #485) ORDER BY ... WITH FILLwith FROM/TO/STEP (PR #493)CODEC(...)column compression option (PR #497)WITH TOTALSin GROUP BY,LIMIT ... BYclause, ANY/ALL JOIN strictness prefix,DEFAULTas identifier (PR #503)SETTINGSclause on SELECT and in CREATE TABLE,TTLcolumn clause,INSERT ... FORMAT(JSONEachRow, CSV, Parquet, etc.) (PR #489)
MariaDB dialect
- New
DialectMariaDBextending MySQL (mariadb) (PR #431) - SEQUENCE DDL:
CREATE/DROP/ALTER SEQUENCEwith full option set (START WITH, INCREMENT BY, MINVALUE/MAXVALUE, CYCLE, CACHE, NOCACHE) - Temporal tables:
FOR SYSTEM_TIME,WITH SYSTEM VERSIONING,PERIOD FOR - Hierarchical queries:
CONNECT BYwithPRIOR,START WITH,NOCYCLE - Added to playground and WASM dialect map (PR #432)
SQL Server enhancements
- PIVOT / UNPIVOT clause parsing (T-SQL) (PR #477)
SQL Transpilation (pkg/transpiler)
Transpile(sql, from, to keywords.SQLDialect): composable rewrite-rule pipeline for cross-dialect conversion (PR #449)- MySQL → PostgreSQL:
AUTO_INCREMENT→SERIAL/BIGSERIAL,TINYINT(1)→BOOLEAN - PostgreSQL → MySQL:
SERIAL→INT AUTO_INCREMENT,ILIKE→LOWER() LIKE LOWER() - PostgreSQL → SQLite:
SERIAL/BIGSERIAL→INTEGER, array types →TEXT
- MySQL → PostgreSQL:
gosqlx.Transpile()top-level convenience wrappergosqlx transpile --from <dialect> --to <dialect>CLI subcommand
Live schema introspection (pkg/schema/db)
Loaderinterface withDatabaseSchema/Table/Column/Index/ForeignKeytypes (PR #448)- PostgreSQL loader (
pkg/schema/postgres): introspects tables, columns (with primary/unique flags), indexes, and foreign keys viainformation_schemaandpg_catalog - MySQL loader (
pkg/schema/mysql): introspects tables, columns, indexes, and foreign keys viainformation_schema - SQLite loader (
pkg/schema/sqlite): introspects via PRAGMA commands (pure Go, no cgo) gosqlx.LoadSchema()top-level dialect-agnostic convenience wrapper- Integration tests using
testcontainers-gov0.32.0 for PostgreSQL and MySQL loaders
DML Transform API (pkg/transform)
AddSetClause,SetClause,RemoveSetClause,ReplaceSetClausefor UPDATE statements (PR #446)AddReturning,RemoveReturningfor INSERT/UPDATE/DELETE (PR #446)
Linter — expanded from 10 to 30 rules (PR #445)
- New rule categories: safety, performance, naming (alongside existing style and whitespace)
- Rules cover SQL injection patterns, missing WHERE clauses on UPDATE/DELETE, implicit type conversions, inconsistent identifier casing, table aliasing conventions, and more
- See
docs/LINTING_RULES.mdfor full reference
Optimization Advisor (pkg/advisor)
- 12 new optimization rules: OPT-009 through OPT-020 (PR #464)
gosqlx optimizeCLI subcommand runs the full advisor pipeline
Fingerprinting (pkg/fingerprint)
Normalize(sql)canonicalizes literals (WHERE id = 123→WHERE id = ?) (PR #463)Fingerprint(sql)returns SHA-256 hash of normalized query for deduplication and query caches- Integration with advisor and linter for aggregated findings
Integrations (sub-modules)
integrations/opentelemetry/:InstrumentedParse()wrapsgosqlx.Parse()with OpenTelemetry spans includingdb.system,db.statement.type,db.sql.tables,db.sql.columnsattributes (PR #451)integrations/gorm/: GORM plugin that records executed query metadata (tables, columns, statement type) via GoSQLX parsing with GORM SQL normalization (backtick identifiers,?placeholders); exposesStats()andReset()APIs (PR #452)- CI workflow for integration sub-modules (
.github/workflows/integrations.yml)
Parser / AST additions
- DDL formatter,
CONNECT BYhierarchical queries,SAMPLEclause (PR #472) - JSON function parsing improvements (PR #460)
gosqlx statsCLI subcommand exposes object pool utilization (PR #459)gosqlx watchCLI subcommand for continuous validation (PR #458)gosqlx actionGitHub Actions integration with inline annotations (PR #443)
C binding
- Coverage hardened from 18% to 93% via comprehensive test suite (PR #447)
Docs, website, and CI
- "Who's Using GoSQLX" section in README (PR #475)
- OpenSSF Scorecard security analysis workflow (PR #443)
- Sentry → GitHub Issues automation (PR #438)
- Website: mobile responsiveness improvements (PR #441), comprehensive a11y/UX audit (PR #440)
- MariaDB + Snowflake added to playground dialect dropdown (PR #432)
Changed
- OpenTelemetry SDK bumped from v1.42.0 to v1.43.0 to address CVE-2026-39883 (PR #502)
- Linter rule count exposed in glama.json, docs, and CLI help (10 → 30)
- Docs: SQL compatibility matrix updated to reflect Snowflake and ClickHouse 100% pass rate
Fixed
- SQL Server TOP rendering: parsed
TopClausevalues now correctly render in formatted output (PR #507). Round-trippers that parseSELECT TOP 10 * FROM usersand format again will seeTOP 10preserved — previously it was silently dropped. - Snowflake ILIKE + PIVOT/UNPIVOT parse-time fix (PR #484)
- MINUS consumed as select-list alias:
SELECT 1 MINUS SELECT 2now correctly treats MINUS as a set operator (PR #494) - ClickHouse production playground WASM 404: committed
gosqlx.wasmto git, removed auto-commit step blocked by branch protection (PRs #423, #424) - Playground React error #310:
useState/useCallbacknow above early returns (PR #429) - Website: Vercel Analytics, Speed Insights, and CSP fixes (PR #433); Sentry hydration mismatch (PRs #434, #437, #439)
- CI:
testcontainersskip on Windows;.trivyignoreentries for unfixable transitive CVEs; graceful handling ofglama-syncon non-GA runners
Deprecated
Carried over from v1.13.0 (no new deprecations in v1.14.0):
parser.Parse([]token.Token)— useParseFromModelTokensinsteadParseFromModelTokensWithPositions— consolidated intoParseFromModelTokensConversionResult.PositionMapping— always nil, will be removed in v2
Security
- CVE-2026-39883 (HIGH,
go.opentelemetry.io/otel/sdk): resolved by upgrading to v1.43.0 (PR #502) .trivyignoreentries audited and documented — all remaining ignores are transitive test-only (Docker via testcontainers) or npm-only (website build-time dependencies, not shipped in Go binaries)
Companion releases
- VS Code extension: bumped to 1.14.0 — tracks library version, no behavioral changes
- MCP server: bumped to 1.14.0 — glama.json updated with MariaDB and ClickHouse in dialect list
pygosqlxPython bindings: bumped to 0.2.0 — Python bindings follow an independent semver track (alpha) since they have not yet received the same QA sweep as the core library