Skip to content

v1.15.0: Tree API, ClickHouse 100%, Oracle Gaps, Correctness Sweep

Choose a tag to compare

@github-actions github-actions released this 14 Oct 12:32
· 153 commits to main since this release
31b5b1c

Tagged at 31b5b1c (2026-07-30). The tag points at the last commit of the v1.15.0 scope, so its date precedes the release being published (2026-10-14).

Covers everything merged between v1.14.0 and the October 2026 performance audit: the high-level Tree API, ClickHouse at 83/83 of the QA corpus, Oracle gaps, and two architect-review correctness sprints (#517, #518). Exported signatures are unchanged apart from additions; read Behavior changes before upgrading.

Behavior changes

  • Linter rules inspect nested queries: 14 built-in rules moved to ast.Walk and 6 more were reinforced, so violations inside subqueries and CTEs are now reported. Expect more findings on nested SQL. (#517)
  • Structured parser errors: 37 fmt.Errorf sites in the parser now return structured *errors.Error values with position and code, and context cancellation returns ctx.Err() directly so errors.Is(err, context.Canceled) works. *errors.Error.WithX methods now copy instead of mutating the receiver. Legacy Parse-family functions wrap the ErrSyntax/ErrTokenize/ErrTimeout/ErrUnsupportedDialect sentinels. (#517, #518)
  • parser.ValidateBytes("") returns an error, matching gosqlx.Validate(""). Snowflake stub statements (USE, COPY INTO, PUT, GET, LIST, REMOVE, CREATE STAGE/STREAM/TASK/PIPE/...) are now *ast.UnsupportedStatement instead of *ast.DescribeStatement. (#511)

Added

  • High-level Tree API in pkg/gosqlx: ParseTree(ctx, sql, opts...) returns an opaque *Tree with typed walkers (WalkSelects, WalkInserts, WalkUpdates, WalkDeletes, WalkCreateTables, WalkJoins, WalkCTEs, WalkFunctionCalls, WalkIdentifiers, WalkBinaryExpressions, generic WalkBy[T]), Tree.Rewrite and Tree.Clone. FormatTree/FormatAST format without re-parsing. Functional options WithDialect, WithStrict, WithTimeout, WithRecovery and WithMaxBytes replace the combinatorial ParseWith* helpers, which remain. ParseReader/ParseReaderMultiple read from an io.Reader, bounded by WithMaxBytes; errors.Is(err, gosqlx.ErrTooLarge) matches when the limit is exceeded. (#517, #518)
  • Dialect-aware gosqlx.SplitStatements(sql, dialect): splits a script on top-level ;, honouring PostgreSQL dollar quoting and E-strings, nested block comments, MySQL backticks and SQL Server brackets. (#518)
  • One-call gosqlx.Lint, gosqlx.Analyze and error helpers: Lint(sql) runs all 30 built-in rules, Analyze(sql) reports basic optimization hints and query complexity, and ErrorCode, ErrorLocation and ErrorHint unwrap structured error details through fmt.Errorf wrapping. (#512)
  • pkg/sql/dialect: typed Dialect and a Capabilities struct with feature flags, exposed through Parser.DialectTyped(), Parser.Capabilities() and Parser.Is<Dialect>() helpers. (#517, #518)
  • .gosqlx.yml linter configuration (pkg/linter/config): YAML loader with rule enable/disable, severity overrides and ignore globs. (#517)
  • keywords.Conflicts(): reports keyword registrations that collide across dialects; 11 silent conflicts were resolved. (#517)
  • ast.UnsupportedStatement and AST.HasUnsupportedStatements(): parse-only Snowflake stubs are now their own node type, and the formatter emits -- UNSUPPORTED: <raw SQL> for them instead of corrupt SQL. (#511)
  • EXTRACT(field FROM expr) parses. (#511)
  • ClickHouse at 83/83 of the QA corpus: ARRAY JOIN / LEFT ARRAY JOIN (new ArrayJoinClause), scalar CTEs (WITH <expr> AS <name>), CREATE MATERIALIZED VIEW with ENGINE/TO, CREATE TABLE ... AS <source> ENGINE = ..., numeric SAMPLE arguments with OFFSET, and LIMIT offset, count. (#513)
  • Named WINDOW clause (SQL:2003): WINDOW w AS (PARTITION BY a ORDER BY b). (#513)
  • Oracle compatibility: ROWNUM/ROWID/LEVEL/SYSDATE pseudo-columns with implicit aliases, PIVOT/UNPIVOT IN lists with AS aliases, and backslashes treated literally in string literals outside MySQL/PostgreSQL. (#513)
  • SQL() for PragmaStatement, ShowStatement, DescribeStatement and ReplaceStatement. (#513)
  • ast.PoolLeakCount(): counts work-queue entries dropped while releasing expressions. (#517)

Changed

  • Deprecations: pkg/sql/monitor is deprecated in favour of pkg/metrics. The legacy parser APIs Parse([]token.Token), ParseFromModelTokensWithPositions and ConversionResult.PositionMapping are scheduled for removal in v2.0. (#511)
  • pkg/sql/ast source split: ast.go and pool.go were split into statement, expression, clause and release files. No declarations changed. (#518)

Fixed

  • Pool leaks: PutSelectStatement released only some pooled fields, large IN lists overflowed the PutExpression work queue, and subqueries inside IN/EXISTS/ANY/ALL/array constructors were never released. (#517, #518)
  • Children() coverage: 14 AST node types returned no children despite holding nodes, so Walk/Inspect skipped them. (#517)
  • LSP: statement dispatch uses a type switch instead of %T string matching, and documentSymbol returns real ranges instead of line 0 to EOF. (#517)
  • Oracle and ClickHouse parsing: CONNECT BY / IS NULL is no longer misread as a CTE, SETTINGS and numeric SAMPLE are no longer consumed as table aliases, and the SQL Server OUTPUT clause on INSERT parses in every dialect. (#513)
  • gosqlx.ParseBytes passes bytes straight to the tokenizer, and seven previously skipped extraction cases (CASE, CAST, IN, BETWEEN, EXTRACT, recursive CTEs) are fixed. (#511)

Security

  • Metrics error counters are bounded: error statistics were keyed by err.Error(), an unbounded map that could exhaust memory. They are now counted per error code. (#517)
  • Trivy findings: golang.org/x/crypto raised to v0.54.0 and brace-expansion pinned to ^5.0.8 in the VS Code extension. (#528)

Internal

  • CI: performance-regression and fuzz-regression jobs, codecov.yml thresholds, and the bodyclose/noctx linters (#512); a CI gate against new p.dialect == comparisons (#518); race tests run through task test:race with a separate CGO task test:cbinding job (#513, #517).
  • Website: site revamp, light-mode fixes and animations (#514, #515, #516).
  • Docs: version and rule-count sweep (#510); integrations bumped to v1.14.0 (#509).
Commit list (GoReleaser)

GoSQLX v1.15.0

High-performance SQL parsing SDK for Go with zero-copy tokenization and object pooling.

Changelog

New Features

  • 70f891e feat(website): Motion animation system + interactive polish (#516)
  • 463ea0a feat(website): comprehensive website revamp — performance, design, UX, new pages (#514)
  • e3bb644 feat: comprehensive project review — API, docs, and CI improvements (#512)
  • b36550f feat: v1.15.0 dialect gaps — Oracle, ClickHouse 100%, WINDOW, AST roundtrip (#513)

Bug Fixes

  • 8f449f0 fix(ast): replace DescribeStatement stubs with UnsupportedStatement, fix extraction gaps (#511)
  • 3f7f2d8 fix(docs): sweep stale version refs, add blog descriptions, update VSCode CHANGELOG (#510)
  • 2830c1c fix(security): resolve new Trivy Repository Scan CVEs
  • b46c4e7 fix(website): comprehensive light mode CSS fixes for Tailwind v4 (#515)
  • dc44163 fix: architect-review sprint 2 — all 5 sprints in one PR (#518)
  • d5a5fff fix: architect-review sprint — 11 correctness & DX defects in one sweep (#517)

Other

  • 31b5b1c Merge pull request #528 from ajitpratap0/fix/trivy-repo-scan-new-cves
  • e6a47df chore(integrations): bump to GoSQLX v1.14.0 (#509)

Documentation

Full Changelog: v1.14.0...v1.15.0