Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.24'
go-version: '1.25.10'
cache: true
- uses: actions/cache@v4
with:
path: ~/go/bin
key: ${{ runner.os }}-go-tools-sqlc-v1.31.1-mockgen-0.6.0
- run: make bin/sqlc-gen-go.wasm
- run: go install github.com/sqlc-dev/sqlc/cmd/sqlc@v1.31.1
- run: go install go.uber.org/mock/mockgen@v0.6.0
- run: make generate-example
- run: make test
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ version: '2'
plugins:
- name: golang
wasm:
url: https://github.com/vtuanjs/sqlc-gen-go/releases/download/v2.4.0/sqlc-gen-go.wasm
sha256: sha256:b158d248bfef63896b296de1a8d818630b711e00719d4a768df4e76ef22d38d6
url: https://github.com/vtuanjs/sqlc-gen-go/releases/download/v2.4.1/sqlc-gen-go.wasm
sha256: sha256:sha256:4b90887b709c3b531add02d8cfcc342f01d4ca50c55549df6ee101efc33cd340
sql:
- schema: schema.sql
queries: query.sql
Expand Down Expand Up @@ -62,8 +62,8 @@ sql:
plugins:
- name: golang
wasm:
url: https://github.com/vtuanjs/sqlc-gen-go/releases/download/v2.4.0/sqlc-gen-go.wasm
sha256: sha256:b158d248bfef63896b296de1a8d818630b711e00719d4a768df4e76ef22d38d6
url: https://github.com/vtuanjs/sqlc-gen-go/releases/download/v2.4.1/sqlc-gen-go.wasm
sha256: sha256:sha256:4b90887b709c3b531add02d8cfcc342f01d4ca50c55549df6ee101efc33cd340
sql:
- engine: postgresql
codegen:
Expand Down
4 changes: 2 additions & 2 deletions example/db/db.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/db/lock.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/db/orders.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/db/product.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/db/users.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion example/e2e-setup/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import (
"time"

"example/db"
"github.com/jackc/pgx/v4"

"github.com/jackc/pgx/v5"
)

const DSN = "postgres://postgres:postgres@localhost:6432/sqlc-test?sslmode=disable"
Expand Down
16 changes: 5 additions & 11 deletions example/go.mod
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
module example

go 1.23.10
go 1.25.10

require (
github.com/jackc/pgconn v1.14.3
github.com/jackc/pgx/v4 v4.18.3
github.com/shopspring/decimal v1.2.0
github.com/jackc/pgx/v5 v5.9.2
github.com/shopspring/decimal v1.4.0
go.uber.org/mock v0.6.0
)

require (
github.com/jackc/chunkreader/v2 v2.0.1 // 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-20221227161230-091c0ba34f0a // indirect
github.com/jackc/pgtype v1.14.4 // indirect
golang.org/x/crypto v0.20.0 // indirect
golang.org/x/text v0.14.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
golang.org/x/text v0.37.0 // indirect
)
213 changes: 14 additions & 199 deletions example/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example/sqlc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ sql:
plugin: golang
options:
package: db
sql_package: "pgx/v4"
sql_package: "pgx/v5"
emit_pointers_for_null_types: true
emit_empty_slices: true
emit_interface: true
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/vtuanjs/sqlc-gen-go

go 1.25.8
go 1.25.10

require (
github.com/fatih/structtag v1.2.0
Expand All @@ -13,7 +13,7 @@ require (
golang.org/x/net v0.55.0 // indirect
golang.org/x/sys v0.45.0 // indirect
golang.org/x/text v0.37.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260519071638-aa98bba5eb94 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260523011958-0a33c5d7ca68 // indirect
google.golang.org/grpc v1.81.1 // indirect
google.golang.org/protobuf v1.36.11 // indirect
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc=
golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38=
gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4=
gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260519071638-aa98bba5eb94 h1:eZCjr/aAF8c5ccm5pb6T4EXgIei5MlAAPWPJk+5ArfY=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260519071638-aa98bba5eb94/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260523011958-0a33c5d7ca68 h1:PvEgGJf9C/1u5CHkInMg7UFYYUoiaQmW2LbtH0pjB78=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260523011958-0a33c5d7ca68/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
google.golang.org/grpc v1.81.1 h1:VnnIIZ88UzOOKLukQi+ImGz8O1Wdp8nAGGnvOfEIWQQ=
google.golang.org/grpc v1.81.1/go.mod h1:xGH9GfzOyMTGIOXBJmXt+BX/V0kcdQbdcuwQ/zNw42I=
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
Expand Down
Loading