Skip to content

Merge upstream v1.31.1#6

Open
ethanndickson wants to merge 68 commits intomainfrom
ethan/rebase-onto-v1.31.1
Open

Merge upstream v1.31.1#6
ethanndickson wants to merge 68 commits intomainfrom
ethan/rebase-onto-v1.31.1

Conversation

@ethanndickson
Copy link
Copy Markdown
Member

@ethanndickson ethanndickson commented May 8, 2026

Generated by Mux on my behalf, the motivation for this PR is coder/internal#965.

Merges upstream v1.31.1 into our fork, picking up 78 upstream commits since the prior fork point. Most importantly:

What this PR does

A standard upstream-merge: git merge v1.31.1 from main, plus a single resolution commit. Our three fork commits (7c1a82bce, aab4e865a, a70c5e5d4) are preserved at their original SHAs and original authors.

Conflict resolution

All content conflicts were the same shape: our renamed github.com/coder/sqlc imports versus upstream additions of new github.com/sqlc-dev/sqlc imports next to existing ones (10 files). Resolved by taking upstream's side, then re-applying the global sqlc-dev/sqlc → coder/sqlc rename across all .go and go.mod files (which also fixes newly-added upstream files like internal/x/expander/expander.go and internal/engine/postgresql/analyzer/analyze.go that auto-merged but still pointed at sqlc-dev/sqlc).

One modify/delete conflict on internal/sqltest/pgx.go — accepted upstream's deletion (removed in sqlc-dev/sqlc#4379, "Remove github.com/jackc/pgx/v4 dependency"). Our only "modification" was the import-path rename, so there's nothing to preserve.

Verification

Built cmd/sqlc from this PR's branch tip, ran coderd/database/generate.sh (sqlc generate → file consolidation → goimports → scripts/dbgengentest) against a dump.sql containing \restrict / \unrestrict markers, regenerated models.go, querier.go, and queries.sql.go, and confirmed go build ./..., go vet ./coderd/database/..., and go test -short ./coderd/database/... all pass. The only generated-code change versus our current pin is the sqlc version stamp (v1.30.0v1.31.1) and one upstream correctness fix in DeleteLicense from sqlc-dev/sqlc#4383 (returns via a fresh local instead of shadowing the input parameter).

Follow-ups in coder/coder

Once this merges:

  1. Update the sqlc-custom block in flake.nix: bump rev to the merge commit, refresh sha256 and vendorHash, and switch unstablePkgs.buildGo125ModulebuildGo126Module (upstream now requires Go 1.26.2).
  2. Drop the temporary pg_dump Docker pin in coderd/database/dbtestutil/db.go introduced as a workaround in coder/coder#19696.

Upstream's PR for our CTE fix (sqlc-dev/sqlc#4159) is still open; once that merges and ships in a release, this fork can be retired entirely. In the meantime, future upstream syncs follow the same pattern: git merge <next-upstream-tag> from main.

kyleconroy and others added 30 commits November 29, 2025 14:19
…v#4199)

* feat(sqlite): Add database analyzer using ncruces/go-sqlite3

Add a SQLite database analyzer that uses the ncruces/go-sqlite3 library,
which is a pure Go SQLite implementation using WebAssembly (no CGO required).

The analyzer provides column and parameter type information by:
- Connecting to a SQLite database (in-memory for managed databases)
- Preparing SQL statements to extract metadata
- Returning column names, types, and table information
- Returning parameter information

Changes:
- Add internal/engine/sqlite/analyzer/analyze.go with the Analyzer implementation
- Add internal/engine/sqlite/analyzer/analyze_test.go with tests
- Wire the analyzer into internal/compiler/engine.go for SQLite engine
- Update internal/endtoend/endtoend_test.go to enable managed databases for SQLite
- Add github.com/ncruces/go-sqlite3 dependency

Co-Authored-By: Claude <[email protected]>

* refactor(sqlite): Replace modernc.org/sqlite with ncruces/go-sqlite3

Replace the modernc.org/sqlite driver with ncruces/go-sqlite3 driver
throughout the codebase. This provides a consistent SQLite implementation
using a single library (ncruces/go-sqlite3) which is pure Go and uses
WebAssembly, requiring no CGO.

Changes:
- Replace modernc.org/sqlite imports with ncruces/go-sqlite3/driver
- Rename vet_modernc.go to vet_sqlite.go
- Rename sqlite_modernc.go to sqlite.go
- Remove modernc.org/sqlite and its dependencies from go.mod
- Make github.com/ncruces/go-sqlite3 a direct dependency

Co-Authored-By: Claude <[email protected]>

* chore: Run go mod tidy after removing modernc.org/sqlite

Clean up go.mod and go.sum after replacing modernc.org/sqlite with
ncruces/go-sqlite3. Removes unused indirect dependencies.

Co-Authored-By: Claude <[email protected]>

* fix(sqltest): Restore SQLite helper functions for ncruces driver

The previous refactor accidentally removed the SQLite and CreateSQLiteDatabase
functions from sqltest/sqlite.go, breaking example tests. This restores the
functions while using the correct "sqlite3" driver name for ncruces/go-sqlite3.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* chore(sqltest): Remove unnecessary wasm build constraint

The original sqlite.go on main had no build constraint. The ncruces/go-sqlite3
driver works differently from modernc.org/sqlite (it uses embedded WASM
internally), so the !wasm constraint is not needed for test code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* chore(cmd): Remove unnecessary wasm build constraint from vet_sqlite.go

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* fix(sqlite): Handle in-memory databases and preserve inferred types

- Apply migrations for in-memory SQLite databases in both the analyzer
  and vet command, since they start empty and need schema setup
- Preserve catalog-inferred column/parameter types when the database
  analyzer returns "any" (SQLite doesn't provide type info for parameters)
- Change driver name from "sqlite" to "sqlite3" for ncruces/go-sqlite3

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* fix(testdata): Update SQLite tests for real database analyzer

The SQLite database analyzer now validates queries against real SQLite,
revealing several issues in test files:

- builtins: Remove sqlite_offset (not available in standard SQLite)
- ddl_create_trigger: Add missing tables referenced by trigger
- insert_select_invalid: Separate schema from query, update error message
- invalid_group_by_reference: Separate schema from query, update error message
- invalid_table_alias: Fix INT to INTEGER, separate schema, update error
- join_left_same_table: Fix authors.parent_id to a.parent_id (use alias)
- limit: Remove UPDATE/DELETE LIMIT (requires special compile option)
- quoted_names_complex: Fix UPDATE referencing renamed table
- select_exists: Change INT to INTEGER for AUTOINCREMENT
- select_not_exists: Fix whitespace, detect parameter
- sqlc_embed: Use :memory: for ATTACH, fix u.users.id to u.id

Tests with different error messages in base vs managed-db contexts now
have exec.json files limiting them to managed-db context only.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps golang from 1.25.3 to 1.25.4.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.25.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…up (sqlc-dev#4180)

Bumps the production-dependencies group in /docs with 1 update: [certifi](https://github.com/certifi/python-certifi).


Updates `certifi` from 2025.10.5 to 2025.11.12
- [Commits](certifi/python-certifi@2025.10.05...2025.11.12)

---
updated-dependencies:
- dependency-name: certifi
  dependency-version: 2025.11.12
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the production-dependencies group with 1 update in the / directory: [google.golang.org/grpc](https://github.com/grpc/grpc-go).


Updates `google.golang.org/grpc` from 1.76.0 to 1.77.0
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.76.0...v1.77.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-version: 1.77.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add community python plugin to language-support.rst
* refactor(fmt_test): use config-based engine detection and parser for statement boundaries

- Parse sqlc config file to determine database engine instead of
  hardcoding pgx/v5 path filter
- Use parser's StmtLocation/StmtLen for proper statement boundaries
  instead of naive semicolon splitting
- Handle both file and directory paths in queries config
- Only test PostgreSQL for now (formatting support is PostgreSQL-only)

This fixes issues with multi-query files containing semicolons in
strings, PL/pgSQL functions, or DO blocks.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* feat(ast): add and improve Format methods for SQL AST nodes

Add Format methods:
- A_ArrayExpr: Format ARRAY[...] literals
- NullIfExpr: Format NULLIF(arg1, arg2) function calls
- OnConflictClause: Format ON CONFLICT ... DO UPDATE/NOTHING
- InferClause: Format conflict target (columns) or ON CONSTRAINT
- IndexElem: Format index elements for conflict targets
- WindowDef: Format window definitions with PARTITION BY, ORDER BY, and frame clauses

Improve existing Format methods:
- A_Expr: Add BETWEEN, NOT BETWEEN, ILIKE, SIMILAR TO, IS DISTINCT FROM handling
- A_Expr_Kind: Add all expression kind constants
- CaseExpr: Handle CASE with test argument and optional ELSE
- DeleteStmt: Add USING clause formatting
- FuncCall: Add DISTINCT, ORDER BY, FILTER, and OVER clause support
- InsertStmt: Delegate to OnConflictClause.Format
- JoinExpr: Add RIGHT JOIN, FULL JOIN, NATURAL, and USING clause
- LockingClause: Add OF clause, SKIP LOCKED, NOWAIT, and fix strength values
- RangeFunction: Add LATERAL support and fix alias spacing
- SelectStmt: Add HAVING clause formatting

These changes reduce test failures from 135 to 102.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* feat(ast): add more Format methods for SQL AST nodes

Add Format methods:
- NullTest: Format IS NULL / IS NOT NULL expressions
- ScalarArrayOpExpr: Format scalar op ANY/ALL (array) expressions
- CommonTableExpr: Add column alias list support

Improve existing Format methods:
- WithClause: Fix spacing after WITH and RECURSIVE keywords

These changes reduce test failures from 102 to 91.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* feat(postgresql): add custom Deparse wrapper with bug fixes

- Switch fmt_test.go to use postgresql.Deparse instead of ast.Format
- Add deparse.go and deparse_wasi.go with Deparse wrapper function
- Fix pg_query_go bug: missing space before SKIP LOCKED
- Skip tests with parse errors (e.g., syntax_errors test cases)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* feat(ast): complete SQL AST formatting implementation

Fixes all ast.Format test failures by implementing comprehensive
Format methods for SQL AST nodes. Key improvements include:

- Named parameters (@param) formatting without space after @
- NULLIF expression support in A_Expr
- NULLS FIRST/LAST in ORDER BY clauses
- Type name mapping (int4→integer, timestamptz→timestamp with time zone)
- Array type support (text[]) and type modifiers (varchar(32))
- CREATE FUNCTION with parameters, options (AS, LANGUAGE), and modes
- CREATE EXTENSION statement formatting
- DO $$ ... $$ anonymous code blocks
- WITHIN GROUP clause for ordered-set aggregates
- Automatic quoting for SQL reserved words and mixed-case identifiers
- CROSS JOIN detection (JOIN without ON/USING clause)
- LATERAL keyword in subselects and function calls
- Array subscript access in UPDATE statements (names[$1])
- Proper AS keyword before aliases

Also removes unused deparse files and cleans up fmt_test.go to use
ast.Format directly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* refactor(postgresql): use existing convert functions instead of translate helpers

Replace custom translate functions (translateTypeNameFromPG, translateOptions,
translateNode, translateDefElem) with existing convert.go functions
(convertTypeName, convertSlice) to maintain architectural consistency.

Both parse.go and convert.go import the same pg_query_go/v6 package, so the
types are compatible and the existing convert functions can be used directly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* refactor(format): add Formatter interface for SQL dialect-specific quoting

- Create internal/sql/format package with Formatter interface
- Add QuoteIdent method to TrackedBuffer that delegates to Formatter
- Implement QuoteIdent on postgresql.Parser using existing IsReservedKeyword
- Update all Format() methods to use buf.QuoteIdent() instead of local quoteIdent()
- Remove duplicate reserved word logic from ast/column_ref.go
- Update ast.Format() to accept a Formatter parameter

This allows each SQL dialect to provide its own identifier quoting logic
based on its reserved keywords and quoting rules.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* refactor(format): add TypeName method to Formatter interface

- Add TypeName(ns, name string) string method to Formatter interface
- Implement TypeName on postgresql.Parser with pg_catalog type mappings
- Add TypeName method to TrackedBuffer that delegates to Formatter
- Update ast.TypeName.Format to use buf.TypeName()
- Remove mapTypeName from ast package (moved to postgresql package)

This allows each SQL dialect to provide its own type name mappings
(e.g., pg_catalog.int4 -> integer for PostgreSQL).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* fix(postgresql): restore parseRelationFromNodes for column type resolution

The convertTypeName function populates extra fields (Names, ArrayBounds,
Typmods) on the TypeName struct which breaks the catalog's type equality
check used for ALTER TYPE RENAME operations.

This change:
- Reverts to using parseRelationFromNodes + rel.TypeName() which only
  populates Catalog, Schema, Name fields needed for type resolution
- Updates ColumnDef.Format to use IsArray field for array formatting
  since TypeName.ArrayBounds is no longer set

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
…-dev#4206)

This PR continues the MySQL AST formatting work with several improvements:

**New AST Nodes:**
- `VariableExpr` - MySQL user variables (@var), distinct from sqlc @param
- `IntervalExpr` - MySQL INTERVAL expressions
- `OnDuplicateKeyUpdate` - MySQL ON DUPLICATE KEY UPDATE clause
- `ParenExpr` - Explicit parentheses for expression grouping

**DELETE with JOIN Support:**
- Extended DeleteStmt with Targets and FromClause fields
- Multi-table DELETE now properly formats: DELETE t1.*, t2.* FROM t1 JOIN t2...
- Updated compiler/output_columns.go to handle new structure

**Bug Fixes:**
- MySQL @variable now preserved as-is (not treated as sqlc named parameter)
- Column type lengths only output for types where meaningful (varchar, char)
- Fixed sqlc.arg() handling in ON DUPLICATE KEY UPDATE clause

**Documentation:**
- Added CLAUDE.md files documenting AST, astutils, named, rewrite packages
- Added CLAUDE.md for dolphin engine with conversion patterns

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <[email protected]>
Implements comprehensive formatting support for SQLite SQL statements,
enabling round-trip format testing similar to MySQL. Key changes:

**New SQLite Formatter:**
- Add format.go implementing Formatter interface for SQLite dialect
- Support SQLite-specific named parameter syntax (`:name` instead of `@name`)

**AST Formatting Fixes:**
- Add `NamedParam` method to Formatter interface for dialect-specific named params
- Fix `CollateExpr` missing Format method for COLLATE clause support
- Add `DefaultValues` field to InsertStmt for INSERT DEFAULT VALUES syntax
- Fix table function argument conversion (e.g., json_each())

**SQLite Parser Improvements:**
- Fix BoolExpr Boolop field for AND/OR expressions
- Add EXISTS/NOT EXISTS subquery handling via SubLink nodes
- Add unary expression support (NOT operator)
- Fix NULL literal conversion in COALESCE expressions

**Test Updates:**
- Add SQLite case to fmt_test.go with case-insensitive fingerprinting
- Regenerate expected output for select_exists/select_not_exists tests
  (EXISTS now correctly returns bool instead of int64)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <[email protected]>
Renames the Formatter interface to Dialect and refactors Format methods
to accept the dialect as a parameter instead of storing it in TrackedBuffer.

**Interface Changes:**
- Rename `format.Formatter` to `format.Dialect`
- Change Format signature from `Format(buf *TrackedBuffer)` to
  `Format(buf *TrackedBuffer, d format.Dialect)`

**TrackedBuffer Simplification:**
- Remove `formatter` field from TrackedBuffer struct
- TrackedBuffer is now a simple strings.Builder wrapper
- NewTrackedBuffer() no longer takes a dialect parameter

**Method Call Updates:**
- `buf.astFormat(x)` → `buf.astFormat(x, d)`
- `buf.join(x, sep)` → `buf.join(x, d, sep)`
- Helper methods now called directly on dialect:
  - `buf.QuoteIdent(x)` → `d.QuoteIdent(x)`
  - `buf.TypeName(ns, name)` → `d.TypeName(ns, name)`
  - `buf.Param(n)` → `d.Param(n)`
  - `buf.Cast(arg, t)` → `d.Cast(arg, t)`
  - `buf.NamedParam(name)` → `d.NamedParam(name)`

This change makes the dialect dependency explicit in Format methods
and simplifies TrackedBuffer to be purely a buffer utility.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <[email protected]>
…reSQL, MySQL, SQLite) (sqlc-dev#4203)

* feat(postgresql): Add star expander for SELECT * and RETURNING *

Adds a new expander package that expands * expressions in SQL queries
to explicit column names by preparing the query against a PostgreSQL
database.

Features:
- Expands SELECT * to explicit column list
- Preserves table prefix for qualified stars (e.g., table.*)
- Handles RETURNING * in INSERT/UPDATE/DELETE statements
- Recursively expands CTEs, including dependent CTEs
- Supports subqueries in FROM clause
- Works with both cgo (pganalyze/pg_query_go) and non-cgo
  (wasilibs/go-pgquery) builds

Example:
  SELECT * FROM authors
  → SELECT id, name, bio FROM authors

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* feat(expander): port expander to use internal AST types

Move expander from internal/engine/postgresql/expander to internal/x/expander
and port it to use the internal AST types instead of pg_query nodes.

Key changes:
- Use internal AST types (*ast.SelectStmt, *ast.InsertStmt, etc.)
- Use astutils.Search for star detection
- Use ast.Format instead of pg_query deparse
- Add Parser interface for dependency injection
- Add test cases for COUNT(*) (should not be expanded)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* feat(expander): add MySQL support and use ColumnGetter interface

- Rename TestExpand to TestExpandPostgreSQL
- Add TestExpandMySQL for MySQL database support
- Replace pgxpool.Pool with ColumnGetter interface for database-agnostic column resolution
- Add PostgreSQLColumnGetter and MySQLColumnGetter implementations
- MySQL tests skip edge cases (double star, star in middle) due to intermediate query formatting issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* fix(expander): use valid MySQL syntax for edge case tests

MySQL doesn't support unqualified `*` mixed with other columns (e.g.,
`SELECT *, *` or `SELECT id, *, name`). These are valid PostgreSQL
but invalid MySQL syntax.

Update MySQL tests to use table-qualified stars which are valid:
- `SELECT authors.*, authors.*` instead of `SELECT *, *`
- `SELECT id, authors.*, name` instead of `SELECT id, *, name`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* feat(expander): add SQLite support

- Add TestExpandSQLite with 8 test cases using in-memory SQLite database
- Rename MySQLColumnGetter to SQLColumnGetter since both MySQL and SQLite
  use the same database/sql-based implementation
- SQLite supports the same star syntax as PostgreSQL (including `SELECT *, *`
  and `SELECT id, *, name`)

Test results:
- PostgreSQL: 14 tests
- MySQL: 8 tests
- SQLite: 8 tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* refactor(expander): use PrepareContext in SQLColumnGetter

Use PrepareContext to validate the query before executing it to get
column metadata. While database/sql doesn't expose column names from
prepared statements directly (unlike pgx), this at least validates
the SQL syntax before execution.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* refactor(expander): use native ncruces/go-sqlite3 API for column names

Use the native sqlite3.Conn.Prepare and stmt.ColumnName/ColumnCount APIs
to get column names without executing the query. This is more efficient
and consistent with how PostgreSQL handles it.

Changes:
- Add SQLiteColumnGetter using native sqlite3.Conn
- Rename SQLColumnGetter to MySQLColumnGetter (MySQL still needs to execute)
- SQLite test now uses sqlite3.Open instead of sql.Open

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* refactor(expander): use forked MySQL driver and fix list formatting

- Update MySQLColumnGetter to use github.com/sqlc-dev/mysql fork with
  StmtMetadata interface for getting column names via prepare
- Add replace directive to go.mod for the forked MySQL driver
- Fix list formatting to use ", " separator instead of "," for proper
  SQL spacing (e.g., "SELECT id, name, bio" instead of "SELECT id,name,bio")
- Update test expectations to reflect proper spacing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
…y with 3 updates (sqlc-dev#4224)

Bumps the production-dependencies group with 3 updates in the / directory: [github.com/ncruces/go-sqlite3](https://github.com/ncruces/go-sqlite3), [github.com/spf13/cobra](https://github.com/spf13/cobra) and [golang.org/x/sync](https://github.com/golang/sync).


Updates `github.com/ncruces/go-sqlite3` from 0.30.2 to 0.30.3
- [Release notes](https://github.com/ncruces/go-sqlite3/releases)
- [Commits](ncruces/go-sqlite3@v0.30.2...v0.30.3)

Updates `github.com/spf13/cobra` from 1.10.1 to 1.10.2
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](spf13/cobra@v1.10.1...v1.10.2)

Updates `golang.org/x/sync` from 0.18.0 to 0.19.0
- [Commits](golang/sync@v0.18.0...v0.19.0)

---
updated-dependencies:
- dependency-name: github.com/ncruces/go-sqlite3
  dependency-version: 0.30.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
- dependency-name: github.com/spf13/cobra
  dependency-version: 1.10.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
- dependency-name: golang.org/x/sync
  dependency-version: 0.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…up (sqlc-dev#4225)

Bumps the production-dependencies group in /docs with 1 update: [urllib3](https://github.com/urllib3/urllib3).


Updates `urllib3` from 2.5.0 to 2.6.1
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@2.5.0...2.6.1)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-version: 2.6.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps golang from 1.25.4 to 1.25.5.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.25.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Replaces manual slice copy loop with built-in copy() function
to fix S1001 linter warning: should use copy(to, from) instead of a loop.
sqlc-dev#4237)

* feat(postgresql): add accurate analyzer mode for database-only analysis

Add an optional `analyzer.accurate: true` mode for PostgreSQL that bypasses
the internal catalog and uses only database-backed analysis.

Key features:
- Uses database PREPARE for all type resolution (columns, parameters)
- Uses expander package for SELECT * and RETURNING * expansion
- Queries pg_catalog to build catalog structures for code generation
- Skips internal catalog building from schema files

Configuration:
```yaml
sql:
  - engine: postgresql
    database:
      uri: "postgres://..."  # or managed: true
    analyzer:
      accurate: true
```

This mode requires a database connection and the schema must exist in the
database. It provides more accurate type information for complex queries.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* test: add end-to-end tests for accurate analyzer mode

Add three end-to-end test cases for the accurate analyzer mode:

1. accurate_star_expansion - Tests SELECT *, INSERT RETURNING *, UPDATE RETURNING *, DELETE RETURNING *
2. accurate_enum - Tests enum type introspection from pg_catalog
3. accurate_cte - Tests CTE (Common Table Expression) with star expansion

All tests use the managed-db context which requires Docker to run
PostgreSQL containers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* fix(tests): update expected output for accurate mode end-to-end tests

Update expected output files to match actual sqlc generate output:
- Fix parameter naming (Column1, Column2, dollar_1)
- Fix nullability types (sql.NullString, sql.NullInt32)
- Fix CTE formatting (single line)
- Fix query semicolons

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* test(e2e): add accurate mode test for CTE with VALUES clause

Tests CTE using VALUES clause with column aliasing to verify
accurate analyzer handles inline table expressions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* fix(ast): fix VALUES clause formatting to output multiple rows

The VALUES clause was incorrectly formatting multiple rows as a single
row with multiple columns. For example:
  VALUES ('A'), ('B'), ('C')
was being formatted as:
  VALUES ('A', 'B', 'C')

This caused the star expander to think the VALUES table had 3 columns
instead of 1, resulting in incorrect SELECT * expansion.

The fix properly iterates over each row in ValuesLists and wraps each
in parentheses.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* feat: rename accurate mode to analyzer.database: only with analyzerv2 experiment

This change refactors the "accurate analyzer mode" feature:

1. Rename config option from `analyzer.accurate: true` to
   `analyzer.database: only` - a third option in addition to true/false

2. Gate the feature behind the `analyzerv2` experiment flag. The feature
   is only enabled when:
   - `analyzer.database: only` is set in the config
   - `SQLCEXPERIMENT=analyzerv2` environment variable is set

3. Update JSON schemas to support boolean or "only" for analyzer.database

4. Add experiment tests for analyzerv2 flag

5. Update end-to-end test configs and expected outputs

The database-only mode skips building the internal catalog from schema
files and instead relies entirely on the database for type resolution
and star expansion.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

* feat: add SQLite support for database-only mode (analyzer.database: only)

This extends the database-only analyzer mode to support SQLite in addition
to PostgreSQL:

1. Add EnsureConn, GetColumnNames, and IntrospectSchema methods to the
   SQLite analyzer for database-only mode functionality

2. Update compiler to handle SQLite database-only mode:
   - Add sqliteAnalyzer field to Compiler struct
   - Initialize SQLite analyzer when database-only mode is enabled
   - Build catalog from SQLite database via PRAGMA table_info

3. Add SQLite end-to-end test case for database-only mode

The SQLite database-only mode uses PRAGMA table_info to introspect
tables and columns, and prepares queries to get column names for
star expansion.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

* refactor: use analyzer interface for database-only mode

- Add EnsureConn and GetColumnNames methods to Analyzer interface
- Remove engine-specific pgAnalyzer and sqliteAnalyzer fields from compiler
- Use unified analyzer interface for database connection initialization
- Keep parsing schema files to build catalog, only use database for star expansion

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* feat: parse schema for syntax validation only in database-only mode

In database-only mode, parse the schema migrations to validate syntax
and collect them for the database connection, but skip updating the
catalog. The database will be the source of truth for schema information.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
* feat: add parse subcommand behind parsecmd experiment

Add a new `parse` subcommand that parses SQL and outputs the AST as JSON.
This is useful for debugging and understanding how sqlc parses SQL statements.

The command requires the `parsecmd` experiment to be enabled via
SQLCEXPERIMENT=parsecmd.

Usage:
  sqlc parse --dialect postgresql|mysql|sqlite [file]

If no file is provided, reads from stdin.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* refactor: use parseCmd global instead of NewCmdParse function

Match the style of other commands in cmd.go by using a global variable
and registering flags in init().

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
…y with 2 updates (sqlc-dev#4256)

Bumps the production-dependencies group with 2 updates in the /docs directory: [certifi](https://github.com/certifi/python-certifi) and [pyparsing](https://github.com/pyparsing/pyparsing).


Updates `certifi` from 2025.11.12 to 2026.1.4
- [Commits](certifi/python-certifi@2025.11.12...2026.01.04)

Updates `pyparsing` from 3.2.5 to 3.3.1
- [Release notes](https://github.com/pyparsing/pyparsing/releases)
- [Changelog](https://github.com/pyparsing/pyparsing/blob/master/CHANGES)
- [Commits](pyparsing/pyparsing@3.2.5...3.3.1)

---
updated-dependencies:
- dependency-name: certifi
  dependency-version: 2026.1.4
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: production-dependencies
- dependency-name: pyparsing
  dependency-version: 3.3.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat: add ClickHouse database engine support

Add ClickHouse support using the github.com/sqlc-dev/doubleclick parser library.

New files in internal/engine/clickhouse/:
- parse.go: Parser implementation using doubleclick
- convert.go: AST converter from doubleclick to sqlc AST
- format.go: ClickHouse-specific SQL formatting
- catalog.go: Catalog initialization
- stdlib.go: Standard library functions
- reserved.go: Reserved keywords
- utils.go: Helper functions
- parse_test.go: Unit tests

Supported SQL operations:
- SELECT with JOINs, subqueries, CTEs, window functions
- INSERT with VALUES and SELECT subquery
- UPDATE and DELETE
- CREATE TABLE, ALTER TABLE, DROP TABLE, TRUNCATE

Co-Authored-By: Claude <[email protected]>

* chore: remove test file

Co-Authored-By: Claude <[email protected]>

* chore: return empty function set from stdlib

Co-Authored-By: Claude <[email protected]>

* refactor: move ClickHouse support to parse command only

Remove ClickHouse from compiler/engine.go and config.go.
Add --dialect clickhouse support to the sqlc parse command.

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
kyleconroy and others added 22 commits April 16, 2026 21:41
sqlc's own code no longer needs pgx/v4 at build time:

- Delete internal/sqltest/pgx.go — the PostgreSQLPgx helper had no callers.
- Migrate the sqlc-pg-gen internal tool from pgx/v4 to pgx/v5; the
  Connect/Query/Scan API surface used here is identical.

pgx/v4 remains a supported code-generation target for sqlc users
(SQLDriverPGXV4 constant and the imports emitted into generated code
are unchanged); only sqlc's own dependency on the library is removed.
go mod tidy also drops chunkreader/v2, pgconn, pgio, pgproto3/v2,
pgtype, and golang.org/x/crypto as transitively unused.

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
)

Bumps [requests](https://github.com/psf/requests) from 2.32.5 to 2.33.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](psf/requests@v2.32.5...v2.33.0)

---
updated-dependencies:
- dependency-name: requests
  dependency-version: 2.33.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
)

Bumps [pygments](https://github.com/pygments/pygments) from 2.19.2 to 2.20.0.
- [Release notes](https://github.com/pygments/pygments/releases)
- [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES)
- [Commits](pygments/pygments@2.19.2...2.20.0)

---
updated-dependencies:
- dependency-name: pygments
  dependency-version: 2.20.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…y with 5 updates (sqlc-dev#4368)

* build(deps): bump the production-dependencies group across 1 directory with 5 updates

Bumps the production-dependencies group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [github.com/google/cel-go](https://github.com/google/cel-go) | `0.27.0` | `0.28.0` |
| [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) | `5.8.0` | `5.9.1` |
| [github.com/lib/pq](https://github.com/lib/pq) | `1.12.0` | `1.12.3` |
| [github.com/ncruces/go-sqlite3](https://github.com/ncruces/go-sqlite3) | `0.32.0` | `0.33.2` |
| [google.golang.org/grpc](https://github.com/grpc/grpc-go) | `1.79.3` | `1.80.0` |



Updates `github.com/google/cel-go` from 0.27.0 to 0.28.0
- [Release notes](https://github.com/google/cel-go/releases)
- [Commits](google/cel-go@v0.27.0...v0.28.0)

Updates `github.com/jackc/pgx/v5` from 5.8.0 to 5.9.1
- [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md)
- [Commits](jackc/pgx@v5.8.0...v5.9.1)

Updates `github.com/lib/pq` from 1.12.0 to 1.12.3
- [Release notes](https://github.com/lib/pq/releases)
- [Changelog](https://github.com/lib/pq/blob/master/CHANGELOG.md)
- [Commits](lib/pq@v1.12.0...v1.12.3)

Updates `github.com/ncruces/go-sqlite3` from 0.32.0 to 0.33.2
- [Release notes](https://github.com/ncruces/go-sqlite3/releases)
- [Commits](ncruces/go-sqlite3@v0.32.0...v0.33.2)

Updates `google.golang.org/grpc` from 1.79.3 to 1.80.0
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.79.3...v1.80.0)

---
updated-dependencies:
- dependency-name: github.com/google/cel-go
  dependency-version: 0.28.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
- dependency-name: github.com/jackc/pgx/v5
  dependency-version: 5.9.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
- dependency-name: github.com/lib/pq
  dependency-version: 1.12.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
- dependency-name: github.com/ncruces/go-sqlite3
  dependency-version: 0.33.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
- dependency-name: google.golang.org/grpc
  dependency-version: 1.80.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>

* Drop github.com/ncruces/go-sqlite3/embed import

ncruces/go-sqlite3 v0.33 replaced its embedded wasm runtime with a
pure-Go translation (via wasm2go) in the new module
github.com/ncruces/go-sqlite3-wasm. The embed subpackage that used to
initialize sqlite3.Binary at import time no longer exists, so the
blank imports break the build. SQLite is now wired in automatically
as a transitive dep.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kyle Conroy <[email protected]>
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
…y with 11 updates (sqlc-dev#4380)

* build(deps): bump the production-dependencies group across 1 directory with 11 updates

Bumps the production-dependencies group with 11 updates in the /docs directory:

| Package | From | To |
| --- | --- | --- |
| [babel](https://github.com/python-babel/babel) | `2.17.0` | `2.18.0` |
| [certifi](https://github.com/certifi/python-certifi) | `2026.1.4` | `2026.2.25` |
| [chardet](https://github.com/chardet/chardet) | `5.2.0` | `7.4.3` |
| [imagesize](https://github.com/shibukawa/imagesize_py) | `1.4.1` | `2.0.0` |
| [myst-parser](https://github.com/executablebooks/MyST-Parser) | `4.0.1` | `5.0.0` |
| [packaging](https://github.com/pypa/packaging) | `25.0` | `26.1` |
| [pyparsing](https://github.com/pyparsing/pyparsing) | `3.3.1` | `3.3.2` |
| [pytz](https://github.com/stub42/pytz) | `2025.2` | `2026.1.post1` |
| [requests](https://github.com/psf/requests) | `2.33.0` | `2.33.1` |
| [sphinx-favicon](https://github.com/tcmetzger/sphinx-favicon) | `1.0.1` | `1.1.0` |
| [sphinx-rtd-theme](https://github.com/readthedocs/sphinx_rtd_theme) | `3.0.2` | `3.1.0` |



Updates `babel` from 2.17.0 to 2.18.0
- [Release notes](https://github.com/python-babel/babel/releases)
- [Changelog](https://github.com/python-babel/babel/blob/master/CHANGES.rst)
- [Commits](python-babel/babel@v2.17.0...v2.18.0)

Updates `certifi` from 2026.1.4 to 2026.2.25
- [Commits](certifi/python-certifi@2026.01.04...2026.02.25)

Updates `chardet` from 5.2.0 to 7.4.3
- [Release notes](https://github.com/chardet/chardet/releases)
- [Changelog](https://github.com/chardet/chardet/blob/main/docs/changelog.rst)
- [Commits](chardet/chardet@5.2.0...7.4.3)

Updates `imagesize` from 1.4.1 to 2.0.0
- [Commits](shibukawa/imagesize_py@1.4.1...2.0.0)

Updates `myst-parser` from 4.0.1 to 5.0.0
- [Release notes](https://github.com/executablebooks/MyST-Parser/releases)
- [Changelog](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md)
- [Commits](executablebooks/MyST-Parser@v4.0.1...v5.0.0)

Updates `packaging` from 25.0 to 26.1
- [Release notes](https://github.com/pypa/packaging/releases)
- [Changelog](https://github.com/pypa/packaging/blob/main/CHANGELOG.rst)
- [Commits](pypa/packaging@25.0...26.1)

Updates `pyparsing` from 3.3.1 to 3.3.2
- [Release notes](https://github.com/pyparsing/pyparsing/releases)
- [Changelog](https://github.com/pyparsing/pyparsing/blob/master/CHANGES)
- [Commits](pyparsing/pyparsing@3.3.1...3.3.2)

Updates `pytz` from 2025.2 to 2026.1.post1
- [Release notes](https://github.com/stub42/pytz/releases)
- [Commits](stub42/pytz@release_2025.2...release_2026.1.post1)

Updates `requests` from 2.33.0 to 2.33.1
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](psf/requests@v2.33.0...v2.33.1)

Updates `sphinx-favicon` from 1.0.1 to 1.1.0
- [Release notes](https://github.com/tcmetzger/sphinx-favicon/releases)
- [Changelog](https://github.com/tcmetzger/sphinx-favicon/blob/main/CHANGELOG)
- [Commits](tcmetzger/sphinx-favicon@v1.0.1...v1.1.0)

Updates `sphinx-rtd-theme` from 3.0.2 to 3.1.0
- [Changelog](https://github.com/readthedocs/sphinx_rtd_theme/blob/master/docs/changelog.rst)
- [Commits](readthedocs/sphinx_rtd_theme@3.0.2...3.1.0)

---
updated-dependencies:
- dependency-name: babel
  dependency-version: 2.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
- dependency-name: certifi
  dependency-version: 2026.2.25
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
- dependency-name: chardet
  dependency-version: 7.4.3
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: production-dependencies
- dependency-name: imagesize
  dependency-version: 2.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: production-dependencies
- dependency-name: myst-parser
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: production-dependencies
- dependency-name: packaging
  dependency-version: '26.1'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: production-dependencies
- dependency-name: pyparsing
  dependency-version: 3.3.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
- dependency-name: pytz
  dependency-version: 2026.1.post1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: production-dependencies
- dependency-name: requests
  dependency-version: 2.33.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
- dependency-name: sphinx-favicon
  dependency-version: 1.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
- dependency-name: sphinx-rtd-theme
  dependency-version: 3.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump Sphinx to 8.2.3 to satisfy myst-parser 5.0.0

myst-parser 5.0.0 requires sphinx>=8,<10, but docs/requirements.txt
was still pinning Sphinx==7.4.7, so pip couldn't resolve the
environment and the Read the Docs build failed before sphinx-build
ran. Bumping to the latest 8.x resolves the conflict.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kyle Conroy <[email protected]>
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
- Add paths-ignore for docs/** and .readthedocs.yaml to the go, buf,
  kotlin, python, and typescript workflows so doc-only PRs don't
  spin up the Go test matrix.
- Add a Read the Docs post_checkout hook that exits 183 (the
  documented "cancel build successfully" code) for PR builds that
  don't touch docs/ or .readthedocs.yaml, mirroring the inverse on
  the RTD side.

Note: if any of the skipped checks are currently listed as required
in branch protection, doc-only PRs will block waiting for them. Flip
those to non-required, or add a matching no-op workflow that runs
under the ignored paths, as a follow-up.

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
* Preserve MySQL optimizer hints in stripped query text

Fixes sqlc-dev#4353. Hint comments (/*+ ... */) on their own line were being
treated as regular block comments and removed from the query string
embedded in generated code. Inline hints already survived because the
surrounding line did not match the block-comment pattern.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* Drop unit test; end-to-end coverage is sufficient

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
Removed paths-ignore for docs and readthedocs in CI.
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
* Bump version from 1.30.0 to 1.31.0

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* Regenerate examples for 1.31.0

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* Regenerate endtoend testdata for 1.31.0

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
@ethanndickson ethanndickson force-pushed the ethan/rebase-onto-v1.31.1 branch from 51a7a02 to f92c8af Compare May 8, 2026 05:27
@ethanndickson ethanndickson changed the title Rebase coder/sqlc onto upstream v1.31.1 Merge upstream v1.31.1 May 8, 2026
@ethanndickson ethanndickson force-pushed the ethan/rebase-onto-v1.31.1 branch from f92c8af to 6510f70 Compare May 8, 2026 05:38
@ethanndickson ethanndickson requested a review from mafredri May 8, 2026 06:07
This pulls in 78 upstream commits since coder/sqlc's prior fork point
(b807fe9), most importantly:

* sqlc-dev#4390: strip \restrict / \unrestrict psql meta-commands
  from schema files (fixes sqlc-dev#4065 / coder/internal#965).
* sqlc-dev#4378: upgrade Go toolchain to 1.26.2.
* Various dependency bumps and parser improvements.

Conflict resolution:

* All content conflicts were import-path collisions — our renamed
  imports (github.com/coder/sqlc) versus upstream's additions of new
  sqlc-dev/sqlc imports. Resolved by taking upstream's side, then
  re-applying the global rename across .go and go.mod files (including
  newly-added upstream files that auto-merged).
* internal/sqltest/pgx.go: accepted upstream deletion (removed in
  sqlc-dev#4379, 'Remove github.com/jackc/pgx/v4 dependency').
@ethanndickson ethanndickson force-pushed the ethan/rebase-onto-v1.31.1 branch from 6510f70 to 08df6fc Compare May 8, 2026 07:28
Copy link
Copy Markdown
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stamping as this is too big to review. Should we merge-commit rather than squash commit this considering?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants