You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -7,24 +7,145 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
+
## [1.14.0] - 2026-04-12
11
+
12
+
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.
13
+
10
14
### Added
11
-
-**SQL Transpilation** (`pkg/transpiler`): New `Transpile(sql, from, to)` function converts SQL between dialects with a composable rewrite-rule pipeline
15
+
16
+
#### Dialect-aware formatting (closes #479)
17
+
-**`transform.FormatSQLWithDialect(stmt, keywords.SQLDialect)`**: renders an AST using dialect-specific row-limiting syntax — `SELECT TOP n` for SQL Server, `FETCH FIRST n ROWS ONLY` for Oracle, `LIMIT n` for PostgreSQL/MySQL/SQLite/Snowflake/ClickHouse/MariaDB
-`FormatOptions.Dialect` field threads dialect through the formatter pipeline
20
+
-`normalizeSelectForDialect()` converts `Limit`/`Offset` into `TopClause` (SQL Server) or `FetchClause` (Oracle) on a shallow copy — original AST never mutated
21
+
- Parsed `TopClause` now renders (previously silently dropped — a long-standing bug)
22
+
- SQL Server pagination: `OFFSET m ROWS FETCH NEXT n ROWS ONLY` when both limit and offset are set
-**Live schema introspection** (`pkg/schema/db`): New `Loader` interface and `DatabaseSchema`/`Table`/`Column`/`Index`/`ForeignKey` types for querying live database metadata
18
-
-**PostgreSQL schema loader** (`pkg/schema/postgres`): Introspects tables, columns (with primary/unique flags), indexes, and foreign keys via `information_schema` and `pg_catalog`
19
-
-**MySQL schema loader** (`pkg/schema/mysql`): Introspects tables, columns, indexes, and foreign keys via `information_schema`
20
-
-**SQLite schema loader** (`pkg/schema/sqlite`): Introspects tables, columns, indexes, and foreign keys via PRAGMA commands (pure Go, no cgo required)
21
-
-**`gosqlx.LoadSchema()`** top-level convenience wrapper for dialect-agnostic schema loading
- Integration tests using `testcontainers-go` v0.32.0 for PostgreSQL and MySQL loaders
23
-
-**MariaDB dialect** (`--dialect mariadb`): New SQL dialect extending MySQL with support for SEQUENCE DDL (`CREATE/DROP/ALTER SEQUENCE` with full option set), temporal tables (`FOR SYSTEM_TIME`, `WITH SYSTEM VERSIONING`, `PERIOD FOR`), and `CONNECT BY` hierarchical queries with `PRIOR`, `START WITH`, and `NOCYCLE`
24
-
-`integrations/opentelemetry/` sub-module: `InstrumentedParse()` wraps `gosqlx.Parse()` with OpenTelemetry spans including `db.system`, `db.statement.type`, `db.sql.tables`, `db.sql.columns` attributes
25
-
-`integrations/gorm/` sub-module: GORM plugin that records executed query metadata (tables, columns, statement type) via GoSQLX parsing with GORM SQL normalization (backtick identifiers, `?` placeholders); exposes `Stats()` and `Reset()` APIs
79
+
80
+
#### DML Transform API (`pkg/transform`)
81
+
-`AddSetClause`, `SetClause`, `RemoveSetClause`, `ReplaceSetClause` for UPDATE statements (PR #446)
82
+
-`AddReturning`, `RemoveReturning` for INSERT/UPDATE/DELETE (PR #446)
83
+
84
+
#### Linter — expanded from 10 to 30 rules (PR #445)
85
+
- New rule categories: **safety**, **performance**, **naming** (alongside existing style and whitespace)
86
+
- Rules cover SQL injection patterns, missing WHERE clauses on UPDATE/DELETE, implicit type conversions, inconsistent identifier casing, table aliasing conventions, and more
87
+
- See `docs/LINTING_RULES.md` for full reference
88
+
89
+
#### Optimization Advisor (`pkg/advisor`)
90
+
- 12 new optimization rules: **OPT-009 through OPT-020** (PR #464)
91
+
-`gosqlx optimize` CLI subcommand runs the full advisor pipeline
92
+
93
+
#### Fingerprinting (`pkg/fingerprint`)
94
+
-**`Normalize(sql)`** canonicalizes literals (`WHERE id = 123` → `WHERE id = ?`) (PR #463)
95
+
-**`Fingerprint(sql)`** returns SHA-256 hash of normalized query for deduplication and query caches
96
+
- Integration with advisor and linter for aggregated findings
97
+
98
+
#### Integrations (sub-modules)
99
+
-**`integrations/opentelemetry/`**: `InstrumentedParse()` wraps `gosqlx.Parse()` with OpenTelemetry spans including `db.system`, `db.statement.type`, `db.sql.tables`, `db.sql.columns` attributes (PR #451)
100
+
-**`integrations/gorm/`**: GORM plugin that records executed query metadata (tables, columns, statement type) via GoSQLX parsing with GORM SQL normalization (backtick identifiers, `?` placeholders); exposes `Stats()` and `Reset()` APIs (PR #452)
26
101
- CI workflow for integration sub-modules (`.github/workflows/integrations.yml`)
-**OpenTelemetry SDK** bumped from v1.42.0 to v1.43.0 to address **CVE-2026-39883** (PR #502)
122
+
- Linter rule count exposed in glama.json, docs, and CLI help (10 → 30)
123
+
- Docs: SQL compatibility matrix updated to reflect Snowflake and ClickHouse 100% pass rate
124
+
125
+
### Fixed
126
+
-**SQL Server TOP rendering**: parsed `TopClause` values now correctly render in formatted output (PR #507). Round-trippers that parse `SELECT TOP 10 * FROM users` and format again will see `TOP 10` preserved — previously it was silently dropped.
- CI: `testcontainers` skip on Windows; `.trivyignore` entries for unfixable transitive CVEs; graceful handling of `glama-sync` on non-GA runners
133
+
134
+
### Deprecated
135
+
Carried over from v1.13.0 (no new deprecations in v1.14.0):
136
+
-`parser.Parse([]token.Token)` — use `ParseFromModelTokens` instead
137
+
-`ParseFromModelTokensWithPositions` — consolidated into `ParseFromModelTokens`
138
+
-`ConversionResult.PositionMapping` — always nil, will be removed in v2
139
+
140
+
### Security
141
+
-**CVE-2026-39883** (HIGH, `go.opentelemetry.io/otel/sdk`): resolved by upgrading to v1.43.0 (PR #502)
142
+
-**`.trivyignore`** entries 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)
143
+
144
+
### Companion releases
145
+
-**VS Code extension**: bumped to **1.14.0** — tracks library version, no behavioral changes
146
+
-**MCP server**: bumped to **1.14.0** — glama.json updated with MariaDB and ClickHouse in dialect list
147
+
-**`pygosqlx` Python 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
0 commit comments