Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
790309d
Fix order by clause in sqlite
andriygm May 14, 2025
1c9ee2e
Add test for mixed param case
andriygm May 15, 2025
ebbbebd
Merge remote-tracking branch 'origin/main' into fix-sqlite-order-by-args
khepin Apr 15, 2026
c78b77b
Re-use parameters
khepin Apr 15, 2026
47dc967
cleanup
khepin Apr 15, 2026
f2141f8
comment
khepin Apr 15, 2026
7f6b186
Catch invalid ON CONFLICT DO UPDATE column references (#4366)
nikolayk812 Apr 17, 2026
98bdb52
build(deps): bump github.com/jackc/pgx/v5 from 5.8.0 to 5.9.0 (#4377)
dependabot[bot] Apr 17, 2026
21e4c47
docs: add sqlc-gen-sqlx to community language support (#4371)
jrandolf Apr 17, 2026
ee439b8
build(deps): bump actions/upload-artifact from 6 to 7 (#4320)
dependabot[bot] Apr 17, 2026
47cb4f9
Upgrade Go toolchain to 1.26.2 (#4378)
kyleconroy Apr 17, 2026
93e1a17
Remove github.com/jackc/pgx/v4 dependency (#4379)
kyleconroy Apr 17, 2026
a2f85e2
build(deps): bump requests from 2.32.5 to 2.33.0 in /docs (#4357)
dependabot[bot] Apr 17, 2026
924c12b
build(deps): bump pygments from 2.19.2 to 2.20.0 in /docs (#4363)
dependabot[bot] Apr 17, 2026
5757d94
build(deps): bump the production-dependencies group across 1 director…
dependabot[bot] Apr 17, 2026
cff03f4
build(deps): bump the production-dependencies group across 1 director…
dependabot[bot] Apr 17, 2026
bba5fc9
Skip CI/RTD builds when the change is irrelevant (#4381)
kyleconroy Apr 17, 2026
3f41c61
Preserve MySQL optimizer hints in generated query text (#4382)
kyleconroy Apr 17, 2026
244a90b
Dedupe sqlc.arg parameters wrapped in a type cast for MySQL (#4384)
kyleconroy Apr 17, 2026
837d7c9
Coerce SQLite JSONB output regardless of type casing (#4385)
kyleconroy Apr 17, 2026
07c3808
Rename :one return variable when it conflicts with a parameter (#4383)
kyleconroy Apr 17, 2026
64d18fc
Map xid8 to pgtype.Uint64 for pgx/v5 (#4387)
kyleconroy Apr 18, 2026
1613aec
Merge branch 'main' of https://github.com/sqlc-dev/sqlc into fix-sqli…
khepin Apr 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/buf.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: buf
on: pull_request
on:
pull_request:
paths-ignore:
- 'docs/**'
- '.readthedocs.yaml'
jobs:
build:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.26.0'
go-version: '1.26.2'
- name: install ./...
run: go build ./...
env:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/ci-kotlin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ on:
push:
branches:
- main
paths-ignore:
- 'docs/**'
- '.readthedocs.yaml'
pull_request:
paths-ignore:
- 'docs/**'
- '.readthedocs.yaml'
jobs:
build:
if: false
Expand All @@ -13,7 +19,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.26.0'
go-version: '1.26.2'
- name: install ./...
run: go install ./...
- uses: actions/checkout@v6
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/ci-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ on:
push:
branches:
- main
paths-ignore:
- 'docs/**'
- '.readthedocs.yaml'
pull_request:
paths-ignore:
- 'docs/**'
- '.readthedocs.yaml'
jobs:
build:
if: false
Expand All @@ -13,7 +19,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.26.0'
go-version: '1.26.2'
- name: install ./...
run: go install ./...
- uses: actions/checkout@v6
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/ci-typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ on:
push:
branches:
- main
paths-ignore:
- 'docs/**'
- '.readthedocs.yaml'
pull_request:
paths-ignore:
- 'docs/**'
- '.readthedocs.yaml'
jobs:
build:
if: false
Expand All @@ -13,7 +19,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.26.0'
go-version: '1.26.2'
- name: install ./...
run: go install ./...
- uses: actions/checkout@v6
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ on:
push:
branches:
- main
paths-ignore:
- 'docs/**'
- '.readthedocs.yaml'
pull_request:
paths-ignore:
- 'docs/**'
- '.readthedocs.yaml'
jobs:
build:
strategy:
Expand All @@ -16,7 +22,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.26.0'
go-version: '1.26.2'
- run: go build ./...
env:
CGO_ENABLED: "0"
Expand All @@ -28,7 +34,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.26.0'
go-version: '1.26.2'

- name: install gotestsum
run: go install gotest.tools/gotestsum@latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
PG_PASSWORD: postgres
PG_PORT: ${{ job.services.postgres.ports['5432'] }}
- name: Save results
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v7
with:
name: sqlc-pg-gen-results
path: gen
Expand Down
8 changes: 8 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ build:
os: ubuntu-22.04
tools:
python: "3.11"
jobs:
post_checkout:
# Cancel PR builds that don't touch the docs.
# https://docs.readthedocs.io/en/stable/build-customization.html#cancel-build-based-on-a-condition
- |
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- docs/ .readthedocs.yaml; then
exit 183
fi

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand Down
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This document provides essential information for working with the sqlc codebase,

### Prerequisites

- **Go 1.26.0+** - Required for building and testing
- **Go 1.26.2+** - Required for building and testing
- **Docker & Docker Compose** - Required for integration tests with databases (local development)
- **Git** - For version control

Expand Down Expand Up @@ -147,7 +147,7 @@ make start # Start database containers
### GitHub Actions Workflow

- **File:** `.github/workflows/ci.yml`
- **Go Version:** 1.26.0
- **Go Version:** 1.26.2
- **Database Setup:** Uses `sqlc-test-setup` (not Docker) to install and start PostgreSQL and MySQL directly on the runner
- **Test Command:** `gotestsum --junitfile junit.xml -- --tags=examples -timeout 20m ./...`
- **Additional Checks:** `govulncheck` for vulnerability scanning
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# STEP 1: Build sqlc
FROM golang:1.26.1 AS builder
FROM golang:1.26.2 AS builder

COPY . /workspace
WORKDIR /workspace
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/language-support.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ PHP `lcarilla/sqlc-plugin-php-dbal`_ Beta N/A
Ruby `DaredevilOSS/sqlc-gen-ruby`_ Beta Beta Beta
Zig `tinyzimmer/sqlc-gen-zig`_ N/A Beta Beta
Python `rayakame/sqlc-gen-better-python`_ N/A Beta Beta
Rust `mathematic-inc/sqlc-gen-sqlx`_ N/A Beta N/A
[Any] `fdietze/sqlc-gen-from-template`_ Stable Stable Stable
======== ================================== =============== =============== ===============

Expand Down Expand Up @@ -53,4 +54,5 @@ Gleam `daniellionel01/parrot`_ Stable Stable S
.. _tinyzimmer/sqlc-gen-zig: https://github.com/tinyzimmer/sqlc-gen-zig
.. _daniellionel01/parrot: https://github.com/daniellionel01/parrot
.. _rayakame/sqlc-gen-better-python: https://github.com/rayakame/sqlc-gen-better-python
.. _mathematic-inc/sqlc-gen-sqlx: https://github.com/mathematic-inc/sqlc-gen-sqlx
.. _github topic: https://github.com/topics/sqlc-plugin
26 changes: 13 additions & 13 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
Babel==2.17.0
Babel==2.18.0
Jinja2==3.1.6
MarkupSafe==3.0.3
Pygments==2.19.2
Sphinx==7.4.7
certifi==2026.1.4
chardet==5.2.0
Pygments==2.20.0
Sphinx==8.2.3
certifi==2026.2.25
chardet==7.4.3
commonmark==0.9.1
docutils==0.20.1
idna==3.11
imagesize==1.4.1
myst-parser==4.0.1
packaging==25.0
pyparsing==3.3.1
pytz==2025.2
requests==2.32.5
imagesize==2.0.0
myst-parser==5.0.0
packaging==26.1
pyparsing==3.3.2
pytz==2026.1.post1
requests==2.33.1
snowballstemmer==3.0.1
sphinx-favicon==1.0.1
sphinx-rtd-theme==3.0.2
sphinx-favicon==1.1.0
sphinx-rtd-theme==3.1.0
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
Expand Down
28 changes: 12 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@ module github.com/sqlc-dev/sqlc

go 1.26.0

toolchain go1.26.2

require (
github.com/antlr4-go/antlr/v4 v4.13.1
github.com/cubicdaiya/gonp v1.0.4
github.com/davecgh/go-spew v1.1.1
github.com/fatih/structtag v1.2.0
github.com/go-sql-driver/mysql v1.9.3
github.com/google/cel-go v0.27.0
github.com/google/cel-go v0.28.0
github.com/google/go-cmp v0.7.0
github.com/jackc/pgx/v4 v4.18.3
github.com/jackc/pgx/v5 v5.8.0
github.com/jackc/pgx/v5 v5.9.1
github.com/jinzhu/inflection v1.0.0
github.com/lib/pq v1.12.0
github.com/ncruces/go-sqlite3 v0.32.0
github.com/lib/pq v1.12.3
github.com/ncruces/go-sqlite3 v0.33.3
github.com/pganalyze/pg_query_go/v6 v6.2.2
github.com/pingcap/tidb/pkg/parser v0.0.0-20250324122243-d51e00e5bbf0
github.com/riza-io/grpc-go v0.2.0
Expand All @@ -25,7 +26,7 @@ require (
github.com/wasilibs/go-pgquery v0.0.0-20250409022910-10ac41983c07
github.com/xeipuuv/gojsonschema v1.2.0
golang.org/x/sync v0.20.0
google.golang.org/grpc v1.79.3
google.golang.org/grpc v1.80.0
google.golang.org/protobuf v1.36.11
gopkg.in/yaml.v3 v3.0.1
)
Expand All @@ -34,14 +35,10 @@ require (
cel.dev/expr v0.25.1 // indirect
filippo.io/edwards25519 v1.1.1 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.14.3 // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.3.3 // indirect
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
github.com/jackc/pgtype v1.14.0 // indirect
github.com/jackc/puddle/v2 v2.2.2 // indirect
github.com/ncruces/go-sqlite3-wasm v1.1.1-0.20260409221933-87e4b35a38d0 // indirect
github.com/ncruces/julianday v1.0.0 // indirect
github.com/pingcap/errors v0.11.5-0.20240311024730-e056997136bb // indirect
github.com/pingcap/failpoint v0.0.0-20240528011301-b51a646c7c86 // indirect
Expand All @@ -53,13 +50,12 @@ require (
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/crypto v0.48.0 // indirect
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b // indirect
golang.org/x/net v0.49.0 // indirect
golang.org/x/sys v0.41.0 // indirect
golang.org/x/text v0.34.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect
golang.org/x/sys v0.43.0 // indirect
golang.org/x/text v0.36.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260120221211-b8f7ae30c516 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260120221211-b8f7ae30c516 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
)

Expand Down
Loading
Loading