Skip to content

Commit 6510f70

Browse files
committed
Merge upstream v1.31.1
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').
2 parents a70c5e5 + a95e91d commit 6510f70

3,011 files changed

Lines changed: 12805 additions & 3922 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/BUG_REPORT.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ body:
99
description: What version of sqlc are you running? If you don't know, run `sqlc version`.
1010
multiple: false
1111
options:
12+
- 1.31.1
13+
- 1.31.0
1214
- 1.30.0
1315
- 1.29.0
1416
- 1.28.0

.github/workflows/buf.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
name: buf
2-
on: pull_request
2+
on:
3+
pull_request:
4+
paths-ignore:
5+
- 'docs/**'
6+
- '.readthedocs.yaml'
37
jobs:
48
build:
59
runs-on: ubuntu-latest
610
steps:
7-
- uses: actions/checkout@v5
11+
- uses: actions/checkout@v6
812
- uses: bufbuild/buf-setup-action@v1
913
- uses: bufbuild/buf-lint-action@v1

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
name: build ${{ matrix.os }}
1010
runs-on: ${{ matrix.os }}
1111
steps:
12-
- uses: actions/checkout@v5
12+
- uses: actions/checkout@v6
1313
- uses: actions/setup-go@v6
1414
with:
15-
go-version: '1.25.0'
15+
go-version: '1.26.2'
1616
- name: install ./...
1717
run: go build ./...
1818
env:

.github/workflows/ci-kotlin.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,26 @@ on:
33
push:
44
branches:
55
- main
6+
paths-ignore:
7+
- 'docs/**'
8+
- '.readthedocs.yaml'
69
pull_request:
10+
paths-ignore:
11+
- 'docs/**'
12+
- '.readthedocs.yaml'
713
jobs:
814
build:
915
if: false
1016
name: test
1117
runs-on: ubuntu-latest
1218
steps:
13-
- uses: actions/checkout@v5
19+
- uses: actions/checkout@v6
1420
- uses: actions/setup-go@v6
1521
with:
16-
go-version: '1.24.1'
22+
go-version: '1.26.2'
1723
- name: install ./...
1824
run: go install ./...
19-
- uses: actions/checkout@v5
25+
- uses: actions/checkout@v6
2026
with:
2127
repository: sqlc-dev/sqlc-gen-kotlin
2228
path: kotlin

.github/workflows/ci-python.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,26 @@ on:
33
push:
44
branches:
55
- main
6+
paths-ignore:
7+
- 'docs/**'
8+
- '.readthedocs.yaml'
69
pull_request:
10+
paths-ignore:
11+
- 'docs/**'
12+
- '.readthedocs.yaml'
713
jobs:
814
build:
915
if: false
1016
name: test
1117
runs-on: ubuntu-latest
1218
steps:
13-
- uses: actions/checkout@v5
19+
- uses: actions/checkout@v6
1420
- uses: actions/setup-go@v6
1521
with:
16-
go-version: '1.24.1'
22+
go-version: '1.26.2'
1723
- name: install ./...
1824
run: go install ./...
19-
- uses: actions/checkout@v5
25+
- uses: actions/checkout@v6
2026
with:
2127
repository: sqlc-dev/sqlc-gen-python
2228
path: python

.github/workflows/ci-typescript.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,26 @@ on:
33
push:
44
branches:
55
- main
6+
paths-ignore:
7+
- 'docs/**'
8+
- '.readthedocs.yaml'
69
pull_request:
10+
paths-ignore:
11+
- 'docs/**'
12+
- '.readthedocs.yaml'
713
jobs:
814
build:
915
if: false
1016
name: test
1117
runs-on: ubuntu-latest
1218
steps:
13-
- uses: actions/checkout@v5
19+
- uses: actions/checkout@v6
1420
- uses: actions/setup-go@v6
1521
with:
16-
go-version: '1.24.1'
22+
go-version: '1.26.2'
1723
- name: install ./...
1824
run: go install ./...
19-
- uses: actions/checkout@v5
25+
- uses: actions/checkout@v6
2026
with:
2127
repository: sqlc-dev/sqlc-gen-typescript
2228
path: typescript

.github/workflows/ci.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
name: build ${{ matrix.goos }}/${{ matrix.goarch }}
1414
runs-on: ubuntu-24.04
1515
steps:
16-
- uses: actions/checkout@v5
16+
- uses: actions/checkout@v6
1717
- uses: actions/setup-go@v6
1818
with:
19-
go-version: '1.25.0'
19+
go-version: '1.26.2'
2020
- run: go build ./...
2121
env:
2222
CGO_ENABLED: "0"
@@ -25,10 +25,10 @@ jobs:
2525
test:
2626
runs-on: ubuntu-24.04
2727
steps:
28-
- uses: actions/checkout@v5
28+
- uses: actions/checkout@v6
2929
- uses: actions/setup-go@v6
3030
with:
31-
go-version: '1.25.0'
31+
go-version: '1.26.2'
3232

3333
- name: install gotestsum
3434
run: go install gotest.tools/gotestsum@latest
@@ -50,13 +50,20 @@ jobs:
5050
env:
5151
CGO_ENABLED: "0"
5252

53+
- name: install databases
54+
run: go run ./cmd/sqlc-test-setup install
55+
56+
- name: start databases
57+
run: go run ./cmd/sqlc-test-setup start
58+
5359
- name: test ./...
54-
run: gotestsum --junitfile junit.xml -- --tags=examples -timeout 20m ./...
55-
if: ${{ matrix.os }} != "windows-2022"
60+
run: gotestsum --junitfile junit.xml -- --tags=examples -timeout 20m -failfast ./...
5661
env:
5762
CI_SQLC_PROJECT_ID: ${{ secrets.CI_SQLC_PROJECT_ID }}
5863
CI_SQLC_AUTH_TOKEN: ${{ secrets.CI_SQLC_AUTH_TOKEN }}
5964
SQLC_AUTH_TOKEN: ${{ secrets.CI_SQLC_AUTH_TOKEN }}
65+
POSTGRESQL_SERVER_URI: "postgres://postgres:postgres@127.0.0.1:5432/postgres?sslmode=disable"
66+
MYSQL_SERVER_URI: "root:mysecretpassword@tcp(127.0.0.1:3306)/mysql?multiStatements=true&parseTime=true"
6067
CGO_ENABLED: "0"
6168

6269
vuln_check:

.github/workflows/gen.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
# needed because the postgres container does not provide a healthcheck
1818
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
1919
steps:
20-
- uses: actions/checkout@v5
20+
- uses: actions/checkout@v6
2121
- uses: actions/setup-go@v6
2222
with:
2323
go-version-file: go.mod
@@ -32,7 +32,7 @@ jobs:
3232
PG_PASSWORD: postgres
3333
PG_PORT: ${{ job.services.postgres.ports['5432'] }}
3434
- name: Save results
35-
uses: actions/upload-artifact@v4
35+
uses: actions/upload-artifact@v7
3636
with:
3737
name: sqlc-pg-gen-results
3838
path: gen

.readthedocs.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ build:
1010
os: ubuntu-22.04
1111
tools:
1212
python: "3.11"
13+
jobs:
14+
post_checkout:
15+
# Cancel PR builds that don't touch the docs.
16+
# https://docs.readthedocs.io/en/stable/build-customization.html#cancel-build-based-on-a-condition
17+
- |
18+
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- docs/ .readthedocs.yaml; then
19+
exit 183
20+
fi
1321
1422
# Build documentation in the docs/ directory with Sphinx
1523
sphinx:

0 commit comments

Comments
 (0)