Repository: sqlc-dev/sqlc
Pull request #3147 (2024-01-17 13:53:34)

feat(dolphin): Add NEXTVAL() to the MySQL catalog


Patch:
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index f278157e4..ecbac919d 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -4,6 +4,11 @@ updates:
     directory: "/"
     schedule:
       interval: "daily"
+    groups:
+      production-dependencies:
+        dependency-type: "production"
+      development-dependencies:
+        dependency-type: "development"
   - package-ecosystem: "docker"
     directory: "/"
     schedule:
@@ -21,3 +26,9 @@ updates:
       # sphinx
       - dependency-name: "docutils"
       - dependency-name: "sphinx"
+    groups:
+      production-dependencies:
+        dependency-type: "production"
+      development-dependencies:
+        dependency-type: "development"
+
diff --git a/.github/workflows/ci-typescript.yml b/.github/workflows/ci-typescript.yml
index 04a1b7b27..f4b94e6c1 100644
--- a/.github/workflows/ci-typescript.yml
+++ b/.github/workflows/ci-typescript.yml
@@ -19,5 +19,7 @@ jobs:
         with:
           repository: sqlc-dev/sqlc-gen-typescript
           path: typescript
+          # v0.1.3
+          ref: daaf539092421adc15f6c3164279a3470716b560
       - run: sqlc diff
         working-directory: typescript/examples
diff --git a/Dockerfile b/Dockerfile
index ca4938044..323f7ee82 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,5 @@
 # STEP 1: Build sqlc
-FROM golang:1.21.6 AS builder
+FROM golang:1.22.1 AS builder
 
 COPY . /workspace
 WORKDIR /workspace
diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html
index c83e9b28a..fa58fc5a7 100644
--- a/docs/_templates/layout.html
+++ b/docs/_templates/layout.html
@@ -1,6 +1,6 @@
 {% extends "!layout.html" %}
 
 {% block extrahead %}
-<script defer data-domain="docs.sqlc.dev" src="https://plausible.io/js/plausible.js"></script>
+<script defer data-domain="docs.sqlc.dev" data-api="https://proxy.sqlc.dev/api/event" src="https://proxy.sqlc.dev/js/script.js"></script>
 {{ super() }}
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/docs/guides/development.md b/docs/guides/development.md
index f795c3ce6..f8196572b 100644
--- a/docs/guides/development.md
+++ b/docs/guides/development.md
@@ -8,6 +8,12 @@ For local development, install `sqlc` under an alias. We suggest `sqlc-dev`.
 go build -o ~/go/bin/sqlc-dev ./cmd/sqlc
 ```
 
+Install `sqlc-gen-json` to avoid test failure.
+
+```
+go build -o ~/go/bin/sqlc-gen-json ./cmd/sqlc-gen-json
+```
+
 ## Running Tests
 
 ```
diff --git a/docs/howto/named_parameters.md b/docs/howto/named_parameters.md
index c4643bd8e..0837c70c1 100644
--- a/docs/howto/named_parameters.md
+++ b/docs/howto/named_parameters.md
@@ -1,6 +1,6 @@
 # Naming parameters
 
-sqlc tried to generate good names for positional parameters, but sometimes it
+sqlc tries to generate good names for positional parameters, but sometimes it
 lacks enough context. The following SQL generates parameters with less than
 ideal names:
 
@@ -46,6 +46,10 @@ type UpdateAuthorNameParams struct {
 If the `sqlc.arg()` syntax is too verbose for your taste, you can use the `@`
 operator as a shortcut.
 
+```{note}
+The `@` operator as a shortcut for `sqlc.arg()` is not supported in MySQL.
+```
+
 ```sql
 -- name: UpsertAuthorName :one
 UPDATE author
diff --git a/docs/howto/select.md b/docs/howto/select.md
index cea3900b6..4c5ae269a 100644
--- a/docs/howto/select.md
+++ b/docs/howto/select.md
@@ -125,7 +125,7 @@ SELECT bio, birth_year FROM authors
 WHERE id = $1;
 ```
 
-When selecting a single column, only that value that returned. The `GetBioForAuthor`
+When selecting a single column, only that value is returned. The `GetBioForAuthor`
 method takes a single `int` as an argument and returns a `string` and an
 `error`.
 
diff --git a/docs/reference/datatypes.md b/docs/reference/datatypes.md
index 4dfade11a..7b9edf56e 100644
--- a/docs/reference/datatypes.md
+++ b/docs/reference/datatypes.md
@@ -62,7 +62,7 @@ type Author struct {
 
 ## Enums
 
-PostgreSQL [enums](https://www.postgresql.org/docs/current/arrays.html) are
+PostgreSQL [enums](https://www.postgresql.org/docs/current/datatype-enum.html) are
 mapped to an aliased string type.
 
 ```sql
@@ -204,10 +204,81 @@ type Book struct {
 }
 ```
 
+## TEXT
+
+In PostgreSQL, when you have a column with the TEXT type, sqlc will map it to a Go string by default. This default mapping applies to `TEXT` columns that are not nullable. However, for nullable `TEXT` columns, sqlc maps them to `pgtype.Text` when using the pgx/v5 driver. This distinction is crucial for developers looking to handle null values appropriately in their Go applications.
+
+To accommodate nullable strings and map them to `*string` in Go, you can use the `emit_pointers_for_null_types` option in your sqlc configuration. This option ensures that nullable SQL columns are represented as pointer types in Go, allowing for a clear distinction between null and non-null values. Another way to do this is by passing the option `pointer: true` when you are overriding the `TEXT` datatype in you sqlc config file.
+
 ## Geometry
 
 ### PostGIS
 
+#### Using `github.com/twpayne/go-geos` (pgx/v5 only)
+
+sqlc can be configured to use the [geos](https://github.com/twpayne/go-geos)
+package for working with PostGIS geometry types in [GEOS](https://libgeos.org/).
+
+There are three steps:
+
+1. Configure sqlc to use `*github.com/twpayne/go-geos.Geom` for geometry types.
+2. Call `github.com/twpayne/pgx-geos.Register` on each
+   `*github.com/jackc/pgx/v5.Conn`.
+3. Annotate your SQL with `::geometry` typecasts, if needed.
+
+```sql
+-- Multipolygons in British National Grid (epsg:27700)
+create table shapes(
+  id serial,
+  name varchar,
+  geom geometry(Multipolygon, 27700)
+);
+
+-- name: GetCentroids :many
+SELECT id, name, ST_Centriod(geom)::geometry FROM shapes;
+```
+
+```json
+{
+  "version": 2,
+  "gen": {
+    "go": {
+      "overrides": [
+        {
+          "db_type": "geometry",
+          "go_type": {
+            "import": "github.com/twpayne/go-geos",
+            "package": "geos",
+            "pointer": true,
+            "type": "Geom"
+          },
+          "nullable": true
+        }
+      ]
+    }
+  }
+}
+```
+
+```go
+import (
+    "github.com/twpayne/go-geos"
+    pgxgeos "github.com/twpayne/pgx-geos"
+)
+
+// ...
+
+config.AfterConnect = func(ctx context.Context, conn *pgx.Conn) error {
+    if err := pgxgeos.Register(ctx, conn, geos.NewContext()); err != nil {
+        return err
+    }
+    return nil
+}
+```
+
+
+#### Using `github.com/twpayne/go-geom`
+
 sqlc can be configured to use the [geom](https://github.com/twpayne/go-geom)
 package for working with PostGIS geometry types.
 
diff --git a/docs/requirements.txt b/docs/requirements.txt
index 2fe3187bb..630f9cc4b 100644
--- a/docs/requirements.txt
+++ b/docs/requirements.txt
@@ -1,19 +1,19 @@
 Babel==2.14.0
 Jinja2==3.1.3
-MarkupSafe==2.1.3
+MarkupSafe==2.1.5
 Pygments==2.17.2
 Sphinx==6.2.1
 alabaster==0.7.16
-certifi==2023.11.17
+certifi==2024.2.2
 chardet==5.2.0
 commonmark==0.9.1
 docutils==0.18.1
 idna==3.6
 imagesize==1.4.1
 myst-parser==2.0.0 
-packaging==23.2
-pyparsing==3.1.1
-pytz==2023.3.post1
+packaging==24.0
+pyparsing==3.1.2
+pytz==2024.1
 requests==2.31.0
 snowballstemmer==2.2.0
 sphinx-favicon==1.0.1
@@ -22,7 +22,7 @@ sphinxcontrib-applehelp==1.0.8
 sphinxcontrib-devhelp==1.0.6
 sphinxcontrib-htmlhelp==2.0.5
 sphinxcontrib-jsmath==1.0.1
-sphinxcontrib-qthelp==1.0.6
-sphinxcontrib-serializinghtml==1.1.9
+sphinxcontrib-qthelp==1.0.7
+sphinxcontrib-serializinghtml==1.1.10
 sphinxext-rediraffe==0.2.7
-urllib3==2.1.0
+urllib3==2.2.1
diff --git a/docs/tutorials/getting-started-mysql.md b/docs/tutorials/getting-started-mysql.md
index 882cd75fa..5450c4ed6 100644
--- a/docs/tutorials/getting-started-mysql.md
+++ b/docs/tutorials/getting-started-mysql.md
@@ -222,4 +222,4 @@ $ sqlc push --tag tutorial
 
 In the sidebar, go to the "Insights" section to run checks against your queries.
 If you need access to a pre-configured MySQL database, check out [managed
-databases](../howtwo/managed-databases.md).
+databases](../howto/managed-databases.md).
diff --git a/docs/tutorials/getting-started-postgresql.md b/docs/tutorials/getting-started-postgresql.md
index db2a46d47..af27392a0 100644
--- a/docs/tutorials/getting-started-postgresql.md
+++ b/docs/tutorials/getting-started-postgresql.md
@@ -242,4 +242,4 @@ $ sqlc push --tag tutorial
 
 In the sidebar, go to the "Insights" section to run checks against your queries.
 If you need access to a pre-configured PostgreSQL database, check out [managed
-databases](../howtwo/managed-databases.md).
+databases](../howto/managed-databases.md).
diff --git a/examples/jets/postgresql/models.go b/examples/jets/postgresql/models.go
index ae9ea2b4d..008523e49 100644
--- a/examples/jets/postgresql/models.go
+++ b/examples/jets/postgresql/models.go
@@ -4,8 +4,6 @@
 
 package jets
 
-import ()
-
 type Jet struct {
 	ID      int32
 	PilotID int32
diff --git a/go.mod b/go.mod
index 53149abbd..7ae554b5c 100644
--- a/go.mod
+++ b/go.mod
@@ -7,74 +7,69 @@ require (
 	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.7.1
-	github.com/google/cel-go v0.18.2
+	github.com/go-sql-driver/mysql v1.8.1
+	github.com/google/cel-go v0.20.1
 	github.com/google/go-cmp v0.6.0
-	github.com/jackc/pgx/v4 v4.18.1
-	github.com/jackc/pgx/v5 v5.5.2
+	github.com/jackc/pgx/v4 v4.18.3
+	github.com/jackc/pgx/v5 v5.5.5
 	github.com/jinzhu/inflection v1.0.0
 	github.com/lib/pq v1.10.9
-	github.com/pganalyze/pg_query_go/v4 v4.2.4-0.20231205012101-7463430c7b73
+	github.com/pganalyze/pg_query_go/v5 v5.1.0
 	github.com/pingcap/tidb/pkg/parser v0.0.0-20231103154709-4f00ece106b1
 	github.com/riza-io/grpc-go v0.2.0
 	github.com/spf13/cobra v1.8.0
 	github.com/spf13/pflag v1.0.5
-	github.com/tetratelabs/wazero v1.6.0
-	github.com/wasilibs/go-pgquery v0.0.0-20231208014744-de63626a1e99
+	github.com/tetratelabs/wazero v1.7.0
+	github.com/wasilibs/go-pgquery v0.0.0-20240319230125-b9b2e95c69a7
 	github.com/xeipuuv/gojsonschema v1.2.0
 	golang.org/x/sync v0.6.0
-	google.golang.org/grpc v1.60.1
-	google.golang.org/protobuf v1.32.0
+	google.golang.org/grpc v1.62.1
+	google.golang.org/protobuf v1.33.0
 	gopkg.in/yaml.v3 v3.0.1
-	modernc.org/sqlite v1.28.0
+	modernc.org/sqlite v1.29.5
 )
 
 require (
+	filippo.io/edwards25519 v1.1.0 // indirect
 	github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirect
 	github.com/dustin/go-humanize v1.0.1 // indirect
 	github.com/golang/protobuf v1.5.3 // indirect
-	github.com/google/uuid v1.3.1 // indirect
+	github.com/google/uuid v1.6.0 // indirect
+	github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
 	github.com/inconshreveable/mousetrap v1.1.0 // indirect
 	github.com/jackc/chunkreader/v2 v2.0.1 // indirect
-	github.com/jackc/pgconn v1.14.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.2 // 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.0 // indirect
 	github.com/jackc/puddle/v2 v2.2.1 // indirect
-	github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
 	github.com/mattn/go-isatty v0.0.16 // indirect
-	github.com/mattn/go-sqlite3 v1.14.18 // indirect
+	github.com/ncruces/go-strftime v0.1.9 // indirect
 	github.com/pingcap/errors v0.11.5-0.20210425183316-da1aaba5fb63 // indirect
 	github.com/pingcap/failpoint v0.0.0-20220801062533-2eaa32854a6c // indirect
 	github.com/pingcap/log v1.1.0 // indirect
 	github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
 	github.com/rogpeppe/go-internal v1.10.0 // indirect
 	github.com/stoewer/go-strcase v1.2.0 // indirect
-	github.com/wasilibs/wazerox v0.0.0-20231208014050-e6b725634531 // indirect
 	github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
 	github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
 	go.uber.org/atomic v1.11.0 // indirect
 	go.uber.org/multierr v1.11.0 // indirect
 	go.uber.org/zap v1.26.0 // indirect
-	golang.org/x/crypto v0.17.0 // indirect
-	golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
-	golang.org/x/mod v0.13.0 // indirect
-	golang.org/x/net v0.17.0 // indirect
-	golang.org/x/sys v0.15.0 // indirect
+	golang.org/x/crypto v0.20.0 // indirect
+	golang.org/x/exp v0.0.0-20231108232855-2478ac86f678 // indirect
+	golang.org/x/net v0.21.0 // indirect
+	golang.org/x/sys v0.17.0 // indirect
 	golang.org/x/text v0.14.0 // indirect
-	golang.org/x/tools v0.14.0 // indirect
-	google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 // indirect
-	google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 // indirect
+	google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect
+	google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect
 	gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
-	lukechampine.com/uint128 v1.2.0 // indirect
-	modernc.org/cc/v3 v3.40.0 // indirect
-	modernc.org/ccgo/v3 v3.16.13 // indirect
-	modernc.org/libc v1.29.0 // indirect
+	modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 // indirect
+	modernc.org/libc v1.41.0 // indirect
 	modernc.org/mathutil v1.6.0 // indirect
 	modernc.org/memory v1.7.2 // indirect
-	modernc.org/opt v0.1.3 // indirect
 	modernc.org/strutil v1.2.0 // indirect
-	modernc.org/token v1.0.1 // indirect
+	modernc.org/token v1.1.0 // indirect
 )
diff --git a/go.sum b/go.sum
index bc87c4255..3adb56ab0 100644
--- a/go.sum
+++ b/go.sum
@@ -1,3 +1,5 @@
+filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
+filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
 github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
 github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
@@ -22,24 +24,26 @@ github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4
 github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94=
 github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
 github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
-github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI=
-github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
+github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y=
+github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=
 github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
 github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw=
 github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
 github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
 github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
 github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
-github.com/google/cel-go v0.18.2 h1:L0B6sNBSVmt0OyECi8v6VOS74KOc9W/tLiWKfZABvf4=
-github.com/google/cel-go v0.18.2/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg=
+github.com/google/cel-go v0.20.1 h1:nDx9r8S3L4pE61eDdt8igGj8rf5kjYR3ILxWIpWNi84=
+github.com/google/cel-go v0.20.1/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg=
 github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
 github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
 github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ=
 github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo=
 github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
-github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
-github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
+github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
+github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
 github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
 github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=
@@ -52,9 +56,8 @@ github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsU
 github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o=
 github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY=
 github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=
-github.com/jackc/pgconn v1.14.0/go.mod h1:9mBNlny0UvkgJdCDvdVHYSjI+8tD2rnKK69Wz8ti++E=
-github.com/jackc/pgconn v1.14.1 h1:smbxIaZA08n6YuxEX1sDyjV/qkbtUtkH20qLkR9MUR4=
-github.com/jackc/pgconn v1.14.1/go.mod h1:9mBNlny0UvkgJdCDvdVHYSjI+8tD2rnKK69Wz8ti++E=
+github.com/jackc/pgconn v1.14.3 h1:bVoTr12EGANZz66nZPkMInAV/KHD2TxH9npjXXgiB3w=
+github.com/jackc/pgconn v1.14.3/go.mod h1:RZbme4uasqzybK2RK5c65VsHxoyaml09lx3tXOcO/VM=
 github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE=
 github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8=
 github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE=
@@ -70,8 +73,8 @@ github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvW
 github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=
 github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
 github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
-github.com/jackc/pgproto3/v2 v2.3.2 h1:7eY55bdBeCz1F2fTzSz69QC+pG46jYq9/jtSPiJ5nn0=
-github.com/jackc/pgproto3/v2 v2.3.2/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
+github.com/jackc/pgproto3/v2 v2.3.3 h1:1HLSx5H+tXR9pW3in3zaztoEwQYRC9SQaYUHjTSUOag=
+github.com/jackc/pgproto3/v2 v2.3.3/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
 github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=
 github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk=
 github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
@@ -85,20 +88,17 @@ github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08
 github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM=
 github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc=
 github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs=
-github.com/jackc/pgx/v4 v4.18.1 h1:YP7G1KABtKpB5IHrO9vYwSrCOhs7p3uqhvhhQBptya0=
-github.com/jackc/pgx/v4 v4.18.1/go.mod h1:FydWkUyadDmdNH/mHnGob881GawxeEm7TcMCzkb+qQE=
-github.com/jackc/pgx/v5 v5.5.2 h1:iLlpgp4Cp/gC9Xuscl7lFL1PhhW+ZLtXZcrfCt4C3tA=
-github.com/jackc/pgx/v5 v5.5.2/go.mod h1:ez9gk+OAat140fv9ErkZDYFWmXLfV+++K0uAOiwgm1A=
+github.com/jackc/pgx/v4 v4.18.3 h1:dE2/TrEsGX3RBprb3qryqSV9Y60iZN1C6i8IrmW9/BA=
+github.com/jackc/pgx/v4 v4.18.3/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw=
+github.com/jackc/pgx/v5 v5.5.5 h1:amBjrZVmksIdNjxGW/IiIMzxMKZFelXbUoPNb+8sjQw=
+github.com/jackc/pgx/v5 v5.5.5/go.mod h1:ez9gk+OAat140fv9ErkZDYFWmXLfV+++K0uAOiwgm1A=
 github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
 github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
 github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
-github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
 github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk=
 github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
 github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
 github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
-github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
-github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
 github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
 github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
 github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
@@ -123,10 +123,12 @@ github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd
 github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
 github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ=
 github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
-github.com/mattn/go-sqlite3 v1.14.18 h1:JL0eqdCOq6DJVNPSvArO/bIV9/P7fbGrV00LZHc+5aI=
-github.com/mattn/go-sqlite3 v1.14.18/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
-github.com/pganalyze/pg_query_go/v4 v4.2.4-0.20231205012101-7463430c7b73 h1:vZEujakYrBzd7CWMwqTsDRU7bdRm4Aiu76X9K3P+qtI=
-github.com/pganalyze/pg_query_go/v4 v4.2.4-0.20231205012101-7463430c7b73/go.mod h1:pRJ9rCcWIhDLAzymhH2iY5kEVEfU6UGrL1wBWuO7gmM=
+github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU=
+github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
+github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
+github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
+github.com/pganalyze/pg_query_go/v5 v5.1.0 h1:MlxQqHZnvA3cbRQYyIrjxEjzo560P6MyTgtlaf3pmXg=
+github.com/pganalyze/pg_query_go/v5 v5.1.0/go.mod h1:FsglvxidZsVN+Ltw3Ai6nTgPVcK2BPukH3jCDEqc1Ug=
 github.com/pingcap/errors v0.11.0/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
 github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
 github.com/pingcap/errors v0.11.5-0.20210425183316-da1aaba5fb63 h1:+FZIDR/D97YOPik4N4lPDaUcLDF/EQPogxtlHB2ZZRM=
@@ -169,31 +171,23 @@ github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag
 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
 github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
 github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
-github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
-github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
 github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
 github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
 github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
 github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
 github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
-github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
 github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
 github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
-github.com/tetratelabs/wazero v1.6.0 h1:z0H1iikCdP8t+q341xqepY4EWvHEw8Es7tlqiVzlP3g=
-github.com/tetratelabs/wazero v1.6.0/go.mod h1:0U0G41+ochRKoPKCJlh0jMg1CHkyfK8kDqiirMmKY8A=
-github.com/wasilibs/go-pgquery v0.0.0-20231208014744-de63626a1e99 h1:HFee1ByN4FrqNVd53Mo28ccGO+g5gxqUV/gdvKMe4b8=
-github.com/wasilibs/go-pgquery v0.0.0-20231208014744-de63626a1e99/go.mod h1:f2JMhFocVxY3VKMd9ykUxMnX4EVew9WOgjnfaNBB6C8=
-github.com/wasilibs/wazerox v0.0.0-20231208014050-e6b725634531 h1:zVJ4SZgaEE9sEH2L9k1+eAvCNa/WAAnT9UiMa3/tQrI=
-github.com/wasilibs/wazerox v0.0.0-20231208014050-e6b725634531/go.mod h1:IQNVyA4d1hWIe23mlMMuqXjyWMdndgSlNx6FqBkwPsM=
+github.com/tetratelabs/wazero v1.7.0 h1:jg5qPydno59wqjpGrHph81lbtHzTrWzwwtD4cD88+hQ=
+github.com/tetratelabs/wazero v1.7.0/go.mod h1:ytl6Zuh20R/eROuyDaGPkp82O9C/DJfXAwJfQ3X6/7Y=
+github.com/wasilibs/go-pgquery v0.0.0-20240319230125-b9b2e95c69a7 h1:sqqLVb63En4uTKFKBWSJ7c1aIFonhM1yn35/+KchOf4=
+github.com/wasilibs/go-pgquery v0.0.0-20240319230125-b9b2e95c69a7/go.mod h1:ZAUjWnxivykc22k0TKFZylOV0WlVQ9nWMExfGFIBuF4=
 github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c=
 github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
 github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=
 github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
 github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
 github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
-github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
 github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
 go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
 go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
@@ -229,29 +223,23 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh
 golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
 golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
 golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
-golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
-golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
-golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
-golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
-golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI=
-golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo=
+golang.org/x/crypto v0.20.0 h1:jmAMJJZXr5KiCw05dfYK9QnqaqKLYXijU23lsEdcQqg=
+golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ=
+golang.org/x/exp v0.0.0-20231108232855-2478ac86f678 h1:mchzmB1XO2pMaKFRqk/+MV3mgGG96aqaPXaMifQU47w=
+golang.org/x/exp v0.0.0-20231108232855-2478ac86f678/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE=
 golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
 golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
 golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
-golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
-golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY=
-golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
+golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
+golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
 golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
 golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
 golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
-golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
-golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
+golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
+golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
 golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
 golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
 golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -266,23 +254,16 @@ golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
-golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
+golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
 golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
-golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
 golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
-golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
 golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
 golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -293,28 +274,26 @@ golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtn
 golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
-golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc=
-golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg=
+golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc=
+golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps=
 golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 h1:W18sezcAYs+3tDZX4F80yctqa12jcP1PUS2gQu1zTPU=
-google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go.mod h1:iargEX0SFPm3xcfMI0d1domjg0ZF4Aa0p2awqyxhvF0=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 h1:6GQBEOdGkX6MMTLT9V+TjtIRZCw9VPD5Z+yHY9wMgS0=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97/go.mod h1:v7nGkzlmW8P3n/bKmWBn2WpBjpOEx8Q6gMueudAmKfY=
-google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU=
-google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM=
+google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU=
+google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s=
+google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk=
+google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE=
 google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
 google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
-google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
-google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
+google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
+google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
@@ -333,31 +312,19 @@ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C
 gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
 gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
-lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI=
-lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
-modernc.org/cc/v3 v3.40.0 h1:P3g79IUS/93SYhtoeaHW+kRCIrYaxJ27MFPv+7kaTOw=
-modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0=
-modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw=
-modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY=
-modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk=
-modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ=
-modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM=
-modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM=
-modernc.org/libc v1.29.0 h1:tTFRFq69YKCF2QyGNuRUQxKBm1uZZLubf6Cjh/pVHXs=
-modernc.org/libc v1.29.0/go.mod h1:DaG/4Q3LRRdqpiLyP0C2m1B8ZMGkQ+cCgOIjEtQlYhQ=
+modernc.org/fileutil v1.3.0 h1:gQ5SIzK3H9kdfai/5x41oQiKValumqNTDXMvKo62HvE=
+modernc.org/fileutil v1.3.0/go.mod h1:XatxS8fZi3pS8/hKG2GH/ArUogfxjpEKs3Ku3aK4JyQ=
+modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 h1:5D53IMaUuA5InSeMu9eJtlQXS2NxAhyWQvkKEgXZhHI=
+modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4=
+modernc.org/libc v1.41.0 h1:g9YAc6BkKlgORsUWj+JwqoB1wU3o4DE3bM3yvA3k+Gk=
+modernc.org/libc v1.41.0/go.mod h1:w0eszPsiXoOnoMJgrXjglgLuDy/bt5RR4y3QzUUeodY=
 modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4=
 modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo=
 modernc.org/memory v1.7.2 h1:Klh90S215mmH8c9gO98QxQFsY+W451E8AnzjoE2ee1E=
 modernc.org/memory v1.7.2/go.mod h1:NO4NVCQy0N7ln+T9ngWqOQfi7ley4vpwvARR+Hjw95E=
-modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4=
-modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0=
-modernc.org/sqlite v1.28.0 h1:Zx+LyDDmXczNnEQdvPuEfcFVA2ZPyaD7UCZDjef3BHQ=
-modernc.org/sqlite v1.28.0/go.mod h1:Qxpazz0zH8Z1xCFyi5GSL3FzbtZ3fvbjmywNogldEW0=
+modernc.org/sqlite v1.29.5 h1:8l/SQKAjDtZFo9lkJLdk8g9JEOeYRG4/ghStDCCTiTE=
+modernc.org/sqlite v1.29.5/go.mod h1:S02dvcmm7TnTRvGhv8IGYyLnIt7AS2KPaB1F/71p75U=
 modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA=
 modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0=
-modernc.org/tcl v1.15.2 h1:C4ybAYCGJw968e+Me18oW55kD/FexcHbqH2xak1ROSY=
-modernc.org/tcl v1.15.2/go.mod h1:3+k/ZaEbKrC8ePv8zJWPtBSW0V7Gg9g8rkmhI1Kfs3c=
-modernc.org/token v1.0.1 h1:A3qvTqOwexpfZZeyI0FeGPDlSWX5pjZu9hF4lU+EKWg=
-modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
-modernc.org/z v1.7.3 h1:zDJf6iHjrnB+WRD88stbXokugjyc0/pB91ri1gO6LZY=
-modernc.org/z v1.7.3/go.mod h1:Ipv4tsdxZRbQyLq9Q1M6gdbkxYzdlrciF2Hi/lS7nWE=
+modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=
+modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
diff --git a/internal/analyzer/analyzer.go b/internal/analyzer/analyzer.go
index 85ae587b6..3d7e3a028 100644
--- a/internal/analyzer/analyzer.go
+++ b/internal/analyzer/analyzer.go
@@ -48,7 +48,7 @@ func (c *CachedAnalyzer) Analyze(ctx context.Context, n ast.Node, q string, sche
 }
 
 func (c *CachedAnalyzer) analyze(ctx context.Context, n ast.Node, q string, schema []string, np *named.ParamSet) (*analysis.Analysis, bool, error) {
-	// Only cache queries for managed databases. We can't be certain the the
+	// Only cache queries for managed databases. We can't be certain the
 	// database is in an unchanged state otherwise
 	if !c.db.Managed {
 		return nil, true, nil
diff --git a/internal/cmd/cmd.go b/internal/cmd/cmd.go
index 3a6070412..9e5ec518c 100644
--- a/internal/cmd/cmd.go
+++ b/internal/cmd/cmd.go
@@ -36,7 +36,6 @@ func init() {
 func Do(args []string, stdin io.Reader, stdout io.Writer, stderr io.Writer) int {
 	rootCmd := &cobra.Command{Use: "sqlc", SilenceUsage: true}
 	rootCmd.PersistentFlags().StringP("file", "f", "", "specify an alternate config file (default: sqlc.yaml)")
-	rootCmd.PersistentFlags().BoolP("experimental", "x", false, "DEPRECATED: enable experimental features (default: false)")
 	rootCmd.PersistentFlags().Bool("no-remote", false, "disable remote execution (default: false)")
 	rootCmd.PersistentFlags().Bool("remote", false, "enable remote execution (default: false)")
 
diff --git a/internal/cmd/generate.go b/internal/cmd/generate.go
index fc02e94d8..a7e64e1e4 100644
--- a/internal/cmd/generate.go
+++ b/internal/cmd/generate.go
@@ -9,6 +9,7 @@ import (
 	"os"
 	"path/filepath"
 	"runtime/trace"
+	"strings"
 	"sync"
 
 	"google.golang.org/grpc"
@@ -208,8 +209,21 @@ func (g *generator) ProcessResult(ctx context.Context, combo config.CombinedSett
 		files[file.Name] = string(file.Contents)
 	}
 	g.m.Lock()
+
+	// out is specified by the user, not a plugin
+	absout := filepath.Join(g.dir, out)
+
 	for n, source := range files {
 		filename := filepath.Join(g.dir, out, n)
+		// filepath.Join calls filepath.Clean which should remove all "..", but
+		// double check to make sure
+		if strings.Contains(filename, "..") {
+			return fmt.Errorf("invalid file output path: %s", filename)
+		}
+		// The output file must be contained inside the output directory
+		if !strings.HasPrefix(filename, absout) {
+			return fmt.Errorf("invalid file output path: %s", filename)
+		}
 		g.output[filename] = source
 	}
 	g.m.Unlock()
diff --git a/internal/codegen/golang/driver.go b/internal/codegen/golang/driver.go
index 7ef723b55..5e3a533dc 100644
--- a/internal/codegen/golang/driver.go
+++ b/internal/codegen/golang/driver.go
@@ -1,46 +1,14 @@
 package golang
 
-type SQLDriver string
+import "github.com/sqlc-dev/sqlc/internal/codegen/golang/opts"
 
-const (
-	SQLPackagePGXV4    string = "pgx/v4"
-	SQLPackagePGXV5    string = "pgx/v5"
-	SQLPackageStandard string = "database/sql"
-)
-
-const (
-	SQLDriverPGXV4            SQLDriver = "github.com/jackc/pgx/v4"
-	SQLDriverPGXV5                      = "github.com/jackc/pgx/v5"
-	SQLDriverLibPQ                      = "github.com/lib/pq"
-	SQLDriverGoSQLDriverMySQL           = "github.com/go-sql-driver/mysql"
-)
-
-func parseDriver(sqlPackage string) SQLDriver {
+func parseDriver(sqlPackage string) opts.SQLDriver {
 	switch sqlPackage {
-	case SQLPackagePGXV4:
-		return SQLDriverPGXV4
-	case SQLPackagePGXV5:
-		return SQLDriverPGXV5
-	default:
-		return SQLDriverLibPQ
-	}
-}
-
-func (d SQLDriver) IsPGX() bool {
-	return d == SQLDriverPGXV4 || d == SQLDriverPGXV5
-}
-
-func (d SQLDriver) IsGoSQLDriverMySQL() bool {
-	return d == SQLDriverGoSQLDriverMySQL
-}
-
-func (d SQLDriver) Package() string {
-	switch d {
-	case SQLDriverPGXV4:
-		return SQLPackagePGXV4
-	case SQLDriverPGXV5:
-		return SQLPackagePGXV5
+	case opts.SQLPackagePGXV4:
+		return opts.SQLDriverPGXV4
+	case opts.SQLPackagePGXV5:
+		return opts.SQLDriverPGXV5
 	default:
-		return SQLPackageStandard
+		return opts.SQLDriverLibPQ
 	}
 }
diff --git a/internal/codegen/golang/gen.go b/internal/codegen/golang/gen.go
index cbb86857b..5b7977f50 100644
--- a/internal/codegen/golang/gen.go
+++ b/internal/codegen/golang/gen.go
@@ -19,7 +19,7 @@ import (
 type tmplCtx struct {
 	Q           string
 	Package     string
-	SQLDriver   SQLDriver
+	SQLDriver   opts.SQLDriver
 	Enums       []Enum
 	Structs     []Struct
 	GoQueries   []Query
@@ -189,15 +189,15 @@ func generate(req *plugin.GenerateRequest, options *opts.Options, enums []Enum,
 		OmitSqlcVersion:           options.OmitSqlcVersion,
 	}
 
-	if tctx.UsesCopyFrom && !tctx.SQLDriver.IsPGX() && options.SqlDriver != SQLDriverGoSQLDriverMySQL {
+	if tctx.UsesCopyFrom && !tctx.SQLDriver.IsPGX() && options.SqlDriver != opts.SQLDriverGoSQLDriverMySQL {
 		return nil, errors.New(":copyfrom is only supported by pgx and github.com/go-sql-driver/mysql")
 	}
 
-	if tctx.UsesCopyFrom && options.SqlDriver == SQLDriverGoSQLDriverMySQL {
+	if tctx.UsesCopyFrom && options.SqlDriver == opts.SQLDriverGoSQLDriverMySQL {
 		if err := checkNoTimesForMySQLCopyFrom(queries); err != nil {
 			return nil, err
 		}
-		tctx.SQLDriver = SQLDriverGoSQLDriverMySQL
+		tctx.SQLDriver = opts.SQLDriverGoSQLDriverMySQL
 	}
 
 	if tctx.UsesBatch && !tctx.SQLDriver.IsPGX() {
@@ -209,6 +209,7 @@ func generate(req *plugin.GenerateRequest, options *opts.Options, enums []Enum,
 		"comment":    sdk.DoubleSlashComment,
 		"escape":     sdk.EscapeBacktick,
 		"imports":    i.Imports,
+		"hasImports": i.HasImports,
 		"hasPrefix":  strings.HasPrefix,
 
 		// These methods are Go specific, they do not belong in the codegen package
diff --git a/internal/codegen/golang/imports.go b/internal/codegen/golang/imports.go
index caa96ffe2..9e7819e4b 100644
--- a/internal/codegen/golang/imports.go
+++ b/internal/codegen/golang/imports.go
@@ -75,6 +75,11 @@ func (i *importer) usesType(typ string) bool {
 	return false
 }
 
+func (i *importer) HasImports(filename string) bool {
+	imports := i.Imports(filename)
+	return len(imports[0]) != 0 || len(imports[1]) != 0
+}
+
 func (i *importer) Imports(filename string) [][]ImportSpec {
 	dbFileName := "db.go"
 	if i.Options.OutputDbFileName != "" {
@@ -121,10 +126,10 @@ func (i *importer) dbImports() fileImports {
 
 	sqlpkg := parseDriver(i.Options.SqlPackage)
 	switch sqlpkg {
-	case SQLDriverPGXV4:
+	case opts.SQLDriverPGXV4:
 		pkg = append(pkg, ImportSpec{Path: "github.com/jackc/pgconn"})
 		pkg = append(pkg, ImportSpec{Path: "github.com/jackc/pgx/v4"})
-	case SQLDriverPGXV5:
+	case opts.SQLDriverPGXV5:
 		pkg = append(pkg, ImportSpec{Path: "github.com/jackc/pgx/v5/pgconn"})
 		pkg = append(pkg, ImportSpec{Path: "github.com/jackc/pgx/v5"})
 	default:
@@ -167,9 +172,9 @@ func buildImports(options *opts.Options, queries []Query, uses func(string) bool
 	for _, q := range queries {
 		if q.Cmd == metadata.CmdExecResult {
 			switch sqlpkg {
-			case SQLDriverPGXV4:
+			case opts.SQLDriverPGXV4:
 				pkg[ImportSpec{Path: "github.com/jackc/pgconn"}] = struct{}{}
-			case SQLDriverPGXV5:
+			case opts.SQLDriverPGXV5:
 				pkg[ImportSpec{Path: "github.com/jackc/pgx/v5/pgconn"}] = struct{}{}
 			default:
 				std["database/sql"] = struct{}{}
@@ -184,7 +189,7 @@ func buildImports(options *opts.Options, queries []Query, uses func(string) bool
 	}
 
 	if uses("pgtype.") {
-		if sqlpkg == SQLDriverPGXV5 {
+		if sqlpkg == opts.SQLDriverPGXV5 {
 			pkg[ImportSpec{Path: "github.com/jackc/pgx/v5/pgtype"}] = struct{}{}
 		} else {
 			pkg[ImportSpec{Path: "github.com/jackc/pgtype"}] = struct{}{}
@@ -424,7 +429,7 @@ func (i *importer) copyfromImports() fileImports {
 	})
 
 	std["context"] = struct{}{}
-	if i.Options.SqlDriver == SQLDriverGoSQLDriverMySQL {
+	if i.Options.SqlDriver == opts.SQLDriverGoSQLDriverMySQL {
 		std["io"] = struct{}{}
 		std["fmt"] = struct{}{}
 		std["sync/atomic"] = struct{}{}
@@ -476,9 +481,9 @@ func (i *importer) batchImports() fileImports {
 	std["errors"] = struct{}{}
 	sqlpkg := parseDriver(i.Options.SqlPackage)
 	switch sqlpkg {
-	case SQLDriverPGXV4:
+	case opts.SQLDriverPGXV4:
 		pkg[ImportSpec{Path: "github.com/jackc/pgx/v4"}] = struct{}{}
-	case SQLDriverPGXV5:
+	case opts.SQLDriverPGXV5:
 		pkg[ImportSpec{Path: "github.com/jackc/pgx/v5"}] = struct{}{}
 	}
 
diff --git a/internal/codegen/golang/opts/enum.go b/internal/codegen/golang/opts/enum.go
new file mode 100644
index 000000000..40457d040
--- /dev/null
+++ b/internal/codegen/golang/opts/enum.go
@@ -0,0 +1,64 @@
+package opts
+
+import "fmt"
+
+type SQLDriver string
+
+const (
+	SQLPackagePGXV4    string = "pgx/v4"
+	SQLPackagePGXV5    string = "pgx/v5"
+	SQLPackageStandard string = "database/sql"
+)
+
+var validPackages = map[string]struct{}{
+	string(SQLPackagePGXV4):    {},
+	string(SQLPackagePGXV5):    {},
+	string(SQLPackageStandard): {},
+}
+
+func validatePackage(sqlPackage string) error {
+	if _, found := validPackages[sqlPackage]; !found {
+		return fmt.Errorf("unknown SQL package: %s", sqlPackage)
+	}
+	return nil
+}
+
+const (
+	SQLDriverPGXV4            SQLDriver = "github.com/jackc/pgx/v4"
+	SQLDriverPGXV5                      = "github.com/jackc/pgx/v5"
+	SQLDriverLibPQ                      = "github.com/lib/pq"
+	SQLDriverGoSQLDriverMySQL           = "github.com/go-sql-driver/mysql"
+)
+
+var validDrivers = map[string]struct{}{
+	string(SQLDriverPGXV4):            {},
+	string(SQLDriverPGXV5):            {},
+	string(SQLDriverLibPQ):            {},
+	string(SQLDriverGoSQLDriverMySQL): {},
+}
+
+func validateDriver(sqlDriver string) error {
+	if _, found := validDrivers[sqlDriver]; !found {
+		return fmt.Errorf("unknown SQL driver: %s", sqlDriver)
+	}
+	return nil
+}
+
+func (d SQLDriver) IsPGX() bool {
+	return d == SQLDriverPGXV4 || d == SQLDriverPGXV5
+}
+
+func (d SQLDriver) IsGoSQLDriverMySQL() bool {
+	return d == SQLDriverGoSQLDriverMySQL
+}
+
+func (d SQLDriver) Package() string {
+	switch d {
+	case SQLDriverPGXV4:
+		return SQLPackagePGXV4
+	case SQLDriverPGXV5:
+		return SQLPackagePGXV5
+	default:
+		return SQLPackageStandard
+	}
+}
diff --git a/internal/codegen/golang/opts/options.go b/internal/codegen/golang/opts/options.go
index 0b6697550..0e2a8562e 100644
--- a/internal/codegen/golang/opts/options.go
+++ b/internal/codegen/golang/opts/options.go
@@ -94,6 +94,18 @@ func parseOpts(req *plugin.GenerateRequest) (*Options, error) {
 		}
 	}
 
+	if options.SqlPackage != "" {
+		if err := validatePackage(options.SqlPackage); err != nil {
+			return nil, fmt.Errorf("invalid options: %s", err)
+		}
+	}
+
+	if options.SqlDriver != "" {
+		if err := validateDriver(options.SqlDriver); err != nil {
+			return nil, fmt.Errorf("invalid options: %s", err)
+		}
+	}
+
 	if options.QueryParameterLimit == nil {
 		options.QueryParameterLimit = new(int32)
 		*options.QueryParameterLimit = 1
diff --git a/internal/codegen/golang/postgresql_type.go b/internal/codegen/golang/postgresql_type.go
index 855d5425c..563cc09ab 100644
--- a/internal/codegen/golang/postgresql_type.go
+++ b/internal/codegen/golang/postgresql_type.go
@@ -48,7 +48,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 		if emitPointersForNull {
 			return "*int32"
 		}
-		if driver == SQLDriverPGXV5 {
+		if driver == opts.SQLDriverPGXV5 {
 			return "pgtype.Int4"
 		}
 		return "sql.NullInt32"
@@ -60,7 +60,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 		if emitPointersForNull {
 			return "*int64"
 		}
-		if driver == SQLDriverPGXV5 {
+		if driver == opts.SQLDriverPGXV5 {
 			return "pgtype.Int8"
 		}
 		return "sql.NullInt64"
@@ -72,7 +72,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 		if emitPointersForNull {
 			return "*int16"
 		}
-		if driver == SQLDriverPGXV5 {
+		if driver == opts.SQLDriverPGXV5 {
 			return "pgtype.Int2"
 		}
 		return "sql.NullInt16"
@@ -84,7 +84,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 		if emitPointersForNull {
 			return "*int32"
 		}
-		if driver == SQLDriverPGXV5 {
+		if driver == opts.SQLDriverPGXV5 {
 			return "pgtype.Int4"
 		}
 		return "sql.NullInt32"
@@ -96,7 +96,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 		if emitPointersForNull {
 			return "*int64"
 		}
-		if driver == SQLDriverPGXV5 {
+		if driver == opts.SQLDriverPGXV5 {
 			return "pgtype.Int8"
 		}
 		return "sql.NullInt64"
@@ -108,7 +108,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 		if emitPointersForNull {
 			return "*int16"
 		}
-		if driver == SQLDriverPGXV5 {
+		if driver == opts.SQLDriverPGXV5 {
 			return "pgtype.Int2"
 		}
 		return "sql.NullInt16"
@@ -120,7 +120,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 		if emitPointersForNull {
 			return "*float64"
 		}
-		if driver == SQLDriverPGXV5 {
+		if driver == opts.SQLDriverPGXV5 {
 			return "pgtype.Float8"
 		}
 		return "sql.NullFloat64"
@@ -132,7 +132,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 		if emitPointersForNull {
 			return "*float32"
 		}
-		if driver == SQLDriverPGXV5 {
+		if driver == opts.SQLDriverPGXV5 {
 			return "pgtype.Float4"
 		}
 		return "sql.NullFloat64" // TODO: Change to sql.NullFloat32 after updating the go.mod file
@@ -160,18 +160,18 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 		if emitPointersForNull {
 			return "*bool"
 		}
-		if driver == SQLDriverPGXV5 {
+		if driver == opts.SQLDriverPGXV5 {
 			return "pgtype.Bool"
 		}
 		return "sql.NullBool"
 
 	case "json":
 		switch driver {
-		case SQLDriverPGXV5:
+		case opts.SQLDriverPGXV5:
 			return "[]byte"
-		case SQLDriverPGXV4:
+		case opts.SQLDriverPGXV4:
 			return "pgtype.JSON"
-		case SQLDriverLibPQ:
+		case opts.SQLDriverLibPQ:
 			if notNull {
 				return "json.RawMessage"
 			} else {
@@ -183,11 +183,11 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 
 	case "jsonb":
 		switch driver {
-		case SQLDriverPGXV5:
+		case opts.SQLDriverPGXV5:
 			return "[]byte"
-		case SQLDriverPGXV4:
+		case opts.SQLDriverPGXV4:
 			return "pgtype.JSONB"
-		case SQLDriverLibPQ:
+		case opts.SQLDriverLibPQ:
 			if notNull {
 				return "json.RawMessage"
 			} else {
@@ -201,7 +201,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 		return "[]byte"
 
 	case "date":
-		if driver == SQLDriverPGXV5 {
+		if driver == opts.SQLDriverPGXV5 {
 			return "pgtype.Date"
 		}
 		if notNull {
@@ -213,7 +213,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 		return "sql.NullTime"
 
 	case "pg_catalog.time":
-		if driver == SQLDriverPGXV5 {
+		if driver == opts.SQLDriverPGXV5 {
 			return "pgtype.Time"
 		}
 		if notNull {
@@ -234,7 +234,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 		return "sql.NullTime"
 
 	case "pg_catalog.timestamp":
-		if driver == SQLDriverPGXV5 {
+		if driver == opts.SQLDriverPGXV5 {
 			return "pgtype.Timestamp"
 		}
 		if notNull {
@@ -246,7 +246,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 		return "sql.NullTime"
 
 	case "pg_catalog.timestamptz", "timestamptz":
-		if driver == SQLDriverPGXV5 {
+		if driver == opts.SQLDriverPGXV5 {
 			return "pgtype.Timestamptz"
 		}
 		if notNull {
@@ -264,13 +264,13 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 		if emitPointersForNull {
 			return "*string"
 		}
-		if driver == SQLDriverPGXV5 {
+		if driver == opts.SQLDriverPGXV5 {
 			return "pgtype.Text"
 		}
 		return "sql.NullString"
 
 	case "uuid":
-		if driver == SQLDriverPGXV5 {
+		if driver == opts.SQLDriverPGXV5 {
 			return "pgtype.UUID"
 		}
 		if notNull {
@@ -283,14 +283,14 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 
 	case "inet":
 		switch driver {
-		case SQLDriverPGXV5:
+		case opts.SQLDriverPGXV5:
 			if notNull {
 				return "netip.Addr"
 			}
 			return "*netip.Addr"
-		case SQLDriverPGXV4:
+		case opts.SQLDriverPGXV4:
 			return "pgtype.Inet"
-		case SQLDriverLibPQ:
+		case opts.SQLDriverLibPQ:
 			return "pqtype.Inet"
 		default:
 			return "interface{}"
@@ -298,14 +298,14 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 
 	case "cidr":
 		switch driver {
-		case SQLDriverPGXV5:
+		case opts.SQLDriverPGXV5:
 			if notNull {
 				return "netip.Prefix"
 			}
 			return "*netip.Prefix"
-		case SQLDriverPGXV4:
+		case opts.SQLDriverPGXV4:
 			return "pgtype.CIDR"
-		case SQLDriverLibPQ:
+		case opts.SQLDriverLibPQ:
 			return "pqtype.CIDR"
 		default:
 			return "interface{}"
@@ -313,11 +313,11 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 
 	case "macaddr", "macaddr8":
 		switch driver {
-		case SQLDriverPGXV5:
+		case opts.SQLDriverPGXV5:
 			return "net.HardwareAddr"
-		case SQLDriverPGXV4:
+		case opts.SQLDriverPGXV4:
 			return "pgtype.Macaddr"
-		case SQLDriverLibPQ:
+		case opts.SQLDriverLibPQ:
 			return "pqtype.Macaddr"
 		default:
 			return "interface{}"
@@ -335,13 +335,13 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 		if emitPointersForNull {
 			return "*string"
 		}
-		if driver == SQLDriverPGXV5 {
+		if driver == opts.SQLDriverPGXV5 {
 			return "pgtype.Text"
 		}
 		return "sql.NullString"
 
 	case "interval", "pg_catalog.interval":
-		if driver == SQLDriverPGXV5 {
+		if driver == opts.SQLDriverPGXV5 {
 			return "pgtype.Interval"
 		}
 		if notNull {
@@ -354,9 +354,9 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 
 	case "daterange":
 		switch driver {
-		case SQLDriverPGXV4:
+		case opts.SQLDriverPGXV4:
 			return "pgtype.Daterange"
-		case SQLDriverPGXV5:
+		case opts.SQLDriverPGXV5:
 			return "pgtype.Range[pgtype.Date]"
 		default:
 			return "interface{}"
@@ -364,7 +364,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 
 	case "datemultirange":
 		switch driver {
-		case SQLDriverPGXV5:
+		case opts.SQLDriverPGXV5:
 			return "pgtype.Multirange[pgtype.Range[pgtype.Date]]"
 		default:
 			return "interface{}"
@@ -372,9 +372,9 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 
 	case "tsrange":
 		switch driver {
-		case SQLDriverPGXV4:
+		case opts.SQLDriverPGXV4:
 			return "pgtype.Tsrange"
-		case SQLDriverPGXV5:
+		case opts.SQLDriverPGXV5:
 			return "pgtype.Range[pgtype.Timestamp]"
 		default:
 			return "interface{}"
@@ -382,7 +382,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 
 	case "tsmultirange":
 		switch driver {
-		case SQLDriverPGXV5:
+		case opts.SQLDriverPGXV5:
 			return "pgtype.Multirange[pgtype.Range[pgtype.Timestamp]]"
 		default:
 			return "interface{}"
@@ -390,9 +390,9 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 
 	case "tstzrange":
 		switch driver {
-		case SQLDriverPGXV4:
+		case opts.SQLDriverPGXV4:
 			return "pgtype.Tstzrange"
-		case SQLDriverPGXV5:
+		case opts.SQLDriverPGXV5:
 			return "pgtype.Range[pgtype.Timestamptz]"
 		default:
 			return "interface{}"
@@ -400,7 +400,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 
 	case "tstzmultirange":
 		switch driver {
-		case SQLDriverPGXV5:
+		case opts.SQLDriverPGXV5:
 			return "pgtype.Multirange[pgtype.Range[pgtype.Timestamptz]]"
 		default:
 			return "interface{}"
@@ -408,9 +408,9 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 
 	case "numrange":
 		switch driver {
-		case SQLDriverPGXV4:
+		case opts.SQLDriverPGXV4:
 			return "pgtype.Numrange"
-		case SQLDriverPGXV5:
+		case opts.SQLDriverPGXV5:
 			return "pgtype.Range[pgtype.Numeric]"
 		default:
 			return "interface{}"
@@ -418,7 +418,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 
 	case "nummultirange":
 		switch driver {
-		case SQLDriverPGXV5:
+		case opts.SQLDriverPGXV5:
 			return "pgtype.Multirange[pgtype.Range[pgtype.Numeric]]"
 		default:
 			return "interface{}"
@@ -426,9 +426,9 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 
 	case "int4range":
 		switch driver {
-		case SQLDriverPGXV4:
+		case opts.SQLDriverPGXV4:
 			return "pgtype.Int4range"
-		case SQLDriverPGXV5:
+		case opts.SQLDriverPGXV5:
 			return "pgtype.Range[pgtype.Int4]"
 		default:
 			return "interface{}"
@@ -436,7 +436,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 
 	case "int4multirange":
 		switch driver {
-		case SQLDriverPGXV5:
+		case opts.SQLDriverPGXV5:
 			return "pgtype.Multirange[pgtype.Range[pgtype.Int4]]"
 		default:
 			return "interface{}"
@@ -444,9 +444,9 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 
 	case "int8range":
 		switch driver {
-		case SQLDriverPGXV4:
+		case opts.SQLDriverPGXV4:
 			return "pgtype.Int8range"
-		case SQLDriverPGXV5:
+		case opts.SQLDriverPGXV5:
 			return "pgtype.Range[pgtype.Int8]"
 		default:
 			return "interface{}"
@@ -454,7 +454,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 
 	case "int8multirange":
 		switch driver {
-		case SQLDriverPGXV5:
+		case opts.SQLDriverPGXV5:
 			return "pgtype.Multirange[pgtype.Range[pgtype.Int8]]"
 		default:
 			return "interface{}"
@@ -467,26 +467,26 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 		return "interface{}"
 
 	case "bit", "varbit", "pg_catalog.bit", "pg_catalog.varbit":
-		if driver == SQLDriverPGXV5 {
+		if driver == opts.SQLDriverPGXV5 {
 			return "pgtype.Bits"
 		}
-		if driver == SQLDriverPGXV4 {
+		if driver == opts.SQLDriverPGXV4 {
 			return "pgtype.Varbit"
 		}
 
 	case "cid":
-		if driver == SQLDriverPGXV5 {
+		if driver == opts.SQLDriverPGXV5 {
 			return "pgtype.Uint32"
 		}
-		if driver == SQLDriverPGXV4 {
+		if driver == opts.SQLDriverPGXV4 {
 			return "pgtype.CID"
 		}
 
 	case "oid":
-		if driver == SQLDriverPGXV5 {
+		if driver == opts.SQLDriverPGXV5 {
 			return "pgtype.Uint32"
 		}
-		if driver == SQLDriverPGXV4 {
+		if driver == opts.SQLDriverPGXV4 {
 			return "pgtype.OID"
 		}
 
@@ -496,10 +496,10 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 		}
 
 	case "xid":
-		if driver == SQLDriverPGXV5 {
+		if driver == opts.SQLDriverPGXV5 {
 			return "pgtype.Uint32"
 		}
-		if driver == SQLDriverPGXV4 {
+		if driver == opts.SQLDriverPGXV4 {
 			return "pgtype.XID"
 		}
 
@@ -539,7 +539,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
 		}
 
 	case "vector":
-		if driver == SQLDriverPGXV5 {
+		if driver == opts.SQLDriverPGXV5 {
 			if emitPointersForNull {
 				return "*pgvector.Vector"
 			} else {
diff --git a/internal/codegen/golang/query.go b/internal/codegen/golang/query.go
index b82178686..3b4fb2fa1 100644
--- a/internal/codegen/golang/query.go
+++ b/internal/codegen/golang/query.go
@@ -4,6 +4,7 @@ import (
 	"fmt"
 	"strings"
 
+	"github.com/sqlc-dev/sqlc/internal/codegen/golang/opts"
 	"github.com/sqlc-dev/sqlc/internal/metadata"
 	"github.com/sqlc-dev/sqlc/internal/plugin"
 )
@@ -15,7 +16,7 @@ type QueryValue struct {
 	DBName      string // The name of the field in the database. Only set if Struct==nil.
 	Struct      *Struct
 	Typ         string
-	SQLDriver   SQLDriver
+	SQLDriver   opts.SQLDriver
 
 	// Column is kept so late in the generation process around to differentiate
 	// between mysql slices and pg arrays
diff --git a/internal/codegen/golang/templates/template.tmpl b/internal/codegen/golang/templates/template.tmpl
index 95400049c..afd50c01a 100644
--- a/internal/codegen/golang/templates/template.tmpl
+++ b/internal/codegen/golang/templates/template.tmpl
@@ -9,12 +9,14 @@
 
 package {{.Package}}
 
+{{ if hasImports .SourceName }}
 import (
 	{{range imports .SourceName}}
 	{{range .}}{{.}}
 	{{end}}
 	{{end}}
 )
+{{end}}
 
 {{template "dbCode" . }}
 {{end}}
@@ -40,12 +42,14 @@ import (
 
 package {{.Package}}
 
+{{ if hasImports .SourceName }}
 import (
 	{{range imports .SourceName}}
 	{{range .}}{{.}}
 	{{end}}
 	{{end}}
 )
+{{end}}
 
 {{template "interfaceCode" . }}
 {{end}}
@@ -69,12 +73,14 @@ import (
 
 package {{.Package}}
 
+{{ if hasImports .SourceName }}
 import (
 	{{range imports .SourceName}}
 	{{range .}}{{.}}
 	{{end}}
 	{{end}}
 )
+{{end}}
 
 {{template "modelsCode" . }}
 {{end}}
@@ -167,12 +173,14 @@ type {{.Name}} struct { {{- range .Fields}}
 
 package {{.Package}}
 
+{{ if hasImports .SourceName }}
 import (
 	{{range imports .SourceName}}
 	{{range .}}{{.}}
 	{{end}}
 	{{end}}
 )
+{{end}}
 
 {{template "queryCode" . }}
 {{end}}
@@ -196,12 +204,14 @@ import (
 
 package {{.Package}}
 
+{{ if hasImports .SourceName }}
 import (
 	{{range imports .SourceName}}
 	{{range .}}{{.}}
 	{{end}}
 	{{end}}
 )
+{{end}}
 
 {{template "copyfromCode" . }}
 {{end}}
@@ -225,12 +235,15 @@ import (
 
 package {{.Package}}
 
+{{ if hasImports .SourceName }}
 import (
 	{{range imports .SourceName}}
 	{{range .}}{{.}}
 	{{end}}
 	{{end}}
 )
+{{end}}
+
 {{template "batchCode" . }}
 {{end}}
 
diff --git a/internal/engine/dolphin/stdlib.go b/internal/engine/dolphin/stdlib.go
index 37de5d7cb..41469ca49 100644
--- a/internal/engine/dolphin/stdlib.go
+++ b/internal/engine/dolphin/stdlib.go
@@ -2388,6 +2388,15 @@ func defaultSchema(name string) *catalog.Schema {
 			Args:       []*catalog.Argument{},
 			ReturnType: &ast.TypeName{Name: "datetime"},
 		},
+		{
+			Name: "NEXTVAL",
+			Args: []*catalog.Argument{
+				{
+					Type: &ast.TypeName{Name: "any"},
+				},
+			},
+			ReturnType: &ast.TypeName{Name: "int"},
+		},
 		{
 			Name: "NOW",
 			Args: []*catalog.Argument{
diff --git a/internal/engine/postgresql/convert.go b/internal/engine/postgresql/convert.go
index 82bd1fb7d..0c77beecf 100644
--- a/internal/engine/postgresql/convert.go
+++ b/internal/engine/postgresql/convert.go
@@ -3,7 +3,7 @@ package postgresql
 import (
 	"fmt"
 
-	pg "github.com/pganalyze/pg_query_go/v4"
+	pg "github.com/pganalyze/pg_query_go/v5"
 
 	"github.com/sqlc-dev/sqlc/internal/sql/ast"
 )
@@ -183,7 +183,6 @@ func convertAggref(n *pg.Aggref) *ast.Aggref {
 		Aggtype:       ast.Oid(n.Aggtype),
 		Aggcollid:     ast.Oid(n.Aggcollid),
 		Inputcollid:   ast.Oid(n.Inputcollid),
-		Aggtranstype:  ast.Oid(n.Aggtranstype),
 		Aggargtypes:   convertSlice(n.Aggargtypes),
 		Aggdirectargs: convertSlice(n.Aggdirectargs),
 		Args:          convertSlice(n.Args),
@@ -1663,7 +1662,6 @@ func convertGrantRoleStmt(n *pg.GrantRoleStmt) *ast.GrantRoleStmt {
 		GrantedRoles: convertSlice(n.GrantedRoles),
 		GranteeRoles: convertSlice(n.GranteeRoles),
 		IsGrant:      n.IsGrant,
-		AdminOpt:     n.AdminOpt,
 		Grantor:      convertRoleSpec(n.Grantor),
 		Behavior:     ast.DropBehavior(n.Behavior),
 	}
@@ -1693,7 +1691,6 @@ func convertGroupingFunc(n *pg.GroupingFunc) *ast.GroupingFunc {
 		Xpr:         convertNode(n.Xpr),
 		Args:        convertSlice(n.Args),
 		Refs:        convertSlice(n.Refs),
-		Cols:        convertSlice(n.Cols),
 		Agglevelsup: ast.Index(n.Agglevelsup),
 		Location:    int(n.Location),
 	}
@@ -1754,7 +1751,6 @@ func convertIndexStmt(n *pg.IndexStmt) *ast.IndexStmt {
 		ExcludeOpNames: convertSlice(n.ExcludeOpNames),
 		Idxcomment:     makeString(n.Idxcomment),
 		IndexOid:       ast.Oid(n.IndexOid),
-		OldNode:        ast.Oid(n.OldNode),
 		Unique:         n.Unique,
 		Primary:        n.Primary,
 		Isconstraint:   n.Isconstraint,
@@ -2016,7 +2012,6 @@ func convertOpExpr(n *pg.OpExpr) *ast.OpExpr {
 	return &ast.OpExpr{
 		Xpr:          convertNode(n.Xpr),
 		Opno:         ast.Oid(n.Opno),
-		Opfuncid:     ast.Oid(n.Opfuncid),
 		Opresulttype: ast.Oid(n.Opresulttype),
 		Opretset:     n.Opretset,
 		Opcollid:     ast.Oid(n.Opcollid),
@@ -2108,7 +2103,7 @@ func convertPartitionSpec(n *pg.PartitionSpec) *ast.PartitionSpec {
 		return nil
 	}
 	return &ast.PartitionSpec{
-		Strategy:   makeString(n.Strategy),
+		Strategy:   makeString(n.Strategy.String()),
 		PartParams: convertSlice(n.PartParams),
 		Location:   int(n.Location),
 	}
@@ -2266,11 +2261,6 @@ func convertRangeTblEntry(n *pg.RangeTblEntry) *ast.RangeTblEntry {
 		Lateral:         n.Lateral,
 		Inh:             n.Inh,
 		InFromCl:        n.InFromCl,
-		RequiredPerms:   ast.AclMode(n.RequiredPerms),
-		CheckAsUser:     ast.Oid(n.CheckAsUser),
-		SelectedCols:    makeUint32Slice(n.SelectedCols),
-		InsertedCols:    makeUint32Slice(n.InsertedCols),
-		UpdatedCols:     makeUint32Slice(n.UpdatedCols),
 		SecurityQuals:   convertSlice(n.SecurityQuals),
 	}
 }
@@ -2498,7 +2488,6 @@ func convertScalarArrayOpExpr(n *pg.ScalarArrayOpExpr) *ast.ScalarArrayOpExpr {
 	return &ast.ScalarArrayOpExpr{
 		Xpr:         convertNode(n.Xpr),
 		Opno:        ast.Oid(n.Opno),
-		Opfuncid:    ast.Oid(n.Opfuncid),
 		UseOr:       n.UseOr,
 		Inputcollid: ast.Oid(n.Inputcollid),
 		Args:        convertSlice(n.Args),
diff --git a/internal/engine/postgresql/parse.go b/internal/engine/postgresql/parse.go
index d3c8bae21..659f1011d 100644
--- a/internal/engine/postgresql/parse.go
+++ b/internal/engine/postgresql/parse.go
@@ -6,7 +6,7 @@ import (
 	"io"
 	"strings"
 
-	nodes "github.com/pganalyze/pg_query_go/v4"
+	nodes "github.com/pganalyze/pg_query_go/v5"
 
 	"github.com/sqlc-dev/sqlc/internal/engine/postgresql/parser"
 	"github.com/sqlc-dev/sqlc/internal/source"
@@ -271,7 +271,7 @@ func translate(node *nodes.Node) (ast.Node, error) {
 				case nodes.AlterTableType_AT_AddColumn:
 					d, ok := altercmd.Def.Node.(*nodes.Node_ColumnDef)
 					if !ok {
-						return nil, fmt.Errorf("expected alter table defintion to be a ColumnDef")
+						return nil, fmt.Errorf("expected alter table definition to be a ColumnDef")
 					}
 
 					rel, err := parseRelationFromNodes(d.ColumnDef.TypeName.Names)
@@ -290,7 +290,7 @@ func translate(node *nodes.Node) (ast.Node, error) {
 				case nodes.AlterTableType_AT_AlterColumnType:
 					d, ok := altercmd.Def.Node.(*nodes.Node_ColumnDef)
 					if !ok {
-						return nil, fmt.Errorf("expected alter table defintion to be a ColumnDef")
+						return nil, fmt.Errorf("expected alter table definition to be a ColumnDef")
 					}
 					col := ""
 					if altercmd.Name != "" {
diff --git a/internal/engine/postgresql/parse_default.go b/internal/engine/postgresql/parse_default.go
index 993ac607e..3f802cc5d 100644
--- a/internal/engine/postgresql/parse_default.go
+++ b/internal/engine/postgresql/parse_default.go
@@ -4,7 +4,7 @@
 package postgresql
 
 import (
-	nodes "github.com/pganalyze/pg_query_go/v4"
+	nodes "github.com/pganalyze/pg_query_go/v5"
 )
 
 var Parse = nodes.Parse
diff --git a/internal/engine/postgresql/parser/parser_default.go b/internal/engine/postgresql/parser/parser_default.go
index 55555d117..06fea36aa 100644
--- a/internal/engine/postgresql/parser/parser_default.go
+++ b/internal/engine/postgresql/parser/parser_default.go
@@ -3,6 +3,6 @@
 
 package parser
 
-import "github.com/pganalyze/pg_query_go/v4/parser"
+import "github.com/pganalyze/pg_query_go/v5/parser"
 
 type Error = parser.Error
diff --git a/internal/engine/postgresql/utils.go b/internal/engine/postgresql/utils.go
index 15b1c49d0..05d4ecc30 100644
--- a/internal/engine/postgresql/utils.go
+++ b/internal/engine/postgresql/utils.go
@@ -1,7 +1,7 @@
 package postgresql
 
 import (
-	nodes "github.com/pganalyze/pg_query_go/v4"
+	nodes "github.com/pganalyze/pg_query_go/v5"
 )
 
 func isArray(n *nodes.TypeName) bool {
diff --git a/internal/engine/sqlite/parse.go b/internal/engine/sqlite/parse.go
index 6da7b8711..13425b156 100644
--- a/internal/engine/sqlite/parse.go
+++ b/internal/engine/sqlite/parse.go
@@ -69,6 +69,7 @@ func (p *Parser) Parse(r io.Reader) ([]ast.Statement, error) {
 			converter := &cc{}
 			out := converter.convert(stmt)
 			if _, ok := out.(*ast.TODO); ok {
+				loc = stmt.GetStop().GetStop() + 2
 				continue
 			}
 			len := (stmt.GetStop().GetStop() + 1) - loc
diff --git a/internal/sql/ast/aggref.go b/internal/sql/ast/aggref.go
index c4fa9af7e..6642f4d9e 100644
--- a/internal/sql/ast/aggref.go
+++ b/internal/sql/ast/aggref.go
@@ -6,7 +6,6 @@ type Aggref struct {
 	Aggtype       Oid
 	Aggcollid     Oid
 	Inputcollid   Oid
-	Aggtranstype  Oid
 	Aggargtypes   *List
 	Aggdirectargs *List
 	Args          *List
diff --git a/internal/sql/ast/grant_role_stmt.go b/internal/sql/ast/grant_role_stmt.go
index 5d785efa7..5e0b2a8e8 100644
--- a/internal/sql/ast/grant_role_stmt.go
+++ b/internal/sql/ast/grant_role_stmt.go
@@ -4,7 +4,6 @@ type GrantRoleStmt struct {
 	GrantedRoles *List
 	GranteeRoles *List
 	IsGrant      bool
-	AdminOpt     bool
 	Grantor      *RoleSpec
 	Behavior     DropBehavior
 }
diff --git a/internal/sql/ast/index_stmt.go b/internal/sql/ast/index_stmt.go
index c0f12bdb6..fe0f03593 100644
--- a/internal/sql/ast/index_stmt.go
+++ b/internal/sql/ast/index_stmt.go
@@ -11,7 +11,6 @@ type IndexStmt struct {
 	ExcludeOpNames *List
 	Idxcomment     *string
 	IndexOid       Oid
-	OldNode        Oid
 	Unique         bool
 	Primary        bool
 	Isconstraint   bool
diff --git a/internal/sql/ast/op_expr.go b/internal/sql/ast/op_expr.go
index 5b371545d..0c7c21726 100644
--- a/internal/sql/ast/op_expr.go
+++ b/internal/sql/ast/op_expr.go
@@ -3,7 +3,6 @@ package ast
 type OpExpr struct {
 	Xpr          Node
 	Opno         Oid
-	Opfuncid     Oid
 	Opresulttype Oid
 	Opretset     bool
 	Opcollid     Oid
diff --git a/internal/sql/ast/scalar_array_op_expr.go b/internal/sql/ast/scalar_array_op_expr.go
index 6b9ad6ad8..fc438c10b 100644
--- a/internal/sql/ast/scalar_array_op_expr.go
+++ b/internal/sql/ast/scalar_array_op_expr.go
@@ -3,7 +3,6 @@ package ast
 type ScalarArrayOpExpr struct {
 	Xpr         Node
 	Opno        Oid
-	Opfuncid    Oid
 	UseOr       bool
 	Inputcollid Oid
 	Args        *List


Test patch:
diff --git a/examples/booktest/postgresql/db_test.go b/examples/booktest/postgresql/db_test.go
index e33ee1b60..2198a4bf1 100644
--- a/examples/booktest/postgresql/db_test.go
+++ b/examples/booktest/postgresql/db_test.go
@@ -150,7 +150,18 @@ func TestBooks(t *testing.T) {
 		t.Logf("Book %d: '%s', Author: '%s', ISBN: '%s' Tags: '%v'\n", ab.BookID, ab.Title, ab.Name.String, ab.Isbn, ab.Tags)
 	}
 
-	// TODO: call say_hello(varchar)
+	// call function
+	pgText, err := dq.SayHello(ctx, "world")
+	if err != nil {
+		t.Fatal(err)
+	}
+	str, err := pgText.Value()
+	if err != nil {
+		t.Fatal(err)
+	}
+	if str != "hello world" {
+		t.Fatal("expected function result to be \"hello world\". actual:", str)
+	}
 
 	// get book 4 and delete
 	b5, err := dq.GetBook(ctx, b3.BookID)
diff --git a/examples/booktest/postgresql/query.sql b/examples/booktest/postgresql/query.sql
index 194897a4b..75b8cd3b6 100644
--- a/examples/booktest/postgresql/query.sql
+++ b/examples/booktest/postgresql/query.sql
@@ -58,3 +58,6 @@ WHERE book_id = $3;
 UPDATE books
 SET title = $1, tags = $2, isbn = $4
 WHERE book_id = $3;
+
+-- name: SayHello :one
+select * from say_hello($1);
diff --git a/examples/booktest/postgresql/query.sql.go b/examples/booktest/postgresql/query.sql.go
index 998e0241e..c39710403 100644
--- a/examples/booktest/postgresql/query.sql.go
+++ b/examples/booktest/postgresql/query.sql.go
@@ -206,6 +206,17 @@ func (q *Queries) GetBook(ctx context.Context, bookID int32) (Book, error) {
 	return i, err
 }
 
+const sayHello = `-- name: SayHello :one
+select say_hello from say_hello($1)
+`
+
+func (q *Queries) SayHello(ctx context.Context, s string) (pgtype.Text, error) {
+	row := q.db.QueryRow(ctx, sayHello, s)
+	var say_hello pgtype.Text
+	err := row.Scan(&say_hello)
+	return say_hello, err
+}
+
 const updateBook = `-- name: UpdateBook :exec
 UPDATE books
 SET title = $1, tags = $2
diff --git a/examples/booktest/postgresql/schema.sql b/examples/booktest/postgresql/schema.sql
index 2beecaba1..3cdd97ca5 100644
--- a/examples/booktest/postgresql/schema.sql
+++ b/examples/booktest/postgresql/schema.sql
@@ -23,9 +23,9 @@ CREATE TABLE books (
 
 CREATE INDEX books_title_idx ON books(title, year);
 
-CREATE FUNCTION say_hello(text) RETURNS text AS $$
+CREATE FUNCTION say_hello(s text) RETURNS text AS $$
 BEGIN
-          RETURN CONCAT('hello ', $1);
+          RETURN CONCAT('hello ', s);
 END;
 $$ LANGUAGE plpgsql;
 
diff --git a/internal/endtoend/case_test.go b/internal/endtoend/case_test.go
index 829964774..4389a4da2 100644
--- a/internal/endtoend/case_test.go
+++ b/internal/endtoend/case_test.go
@@ -5,6 +5,7 @@ import (
 	"fmt"
 	"os"
 	"path/filepath"
+	"runtime"
 	"strings"
 	"testing"
 )
@@ -34,6 +35,7 @@ func parseStderr(t *testing.T, dir, testctx string) []byte {
 	t.Helper()
 	paths := []string{
 		filepath.Join(dir, "stderr", fmt.Sprintf("%s.txt", testctx)),
+		filepath.Join(dir, fmt.Sprintf("stderr_%s.txt", runtime.GOOS)),
 		filepath.Join(dir, "stderr.txt"),
 	}
 	for _, path := range paths {
diff --git a/internal/endtoend/testdata/alias/mysql/go/models.go b/internal/endtoend/testdata/alias/mysql/go/models.go
index 640094aa5..3fe613c68 100644
--- a/internal/endtoend/testdata/alias/mysql/go/models.go
+++ b/internal/endtoend/testdata/alias/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID uint64
 }
diff --git a/internal/endtoend/testdata/alias/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/alias/postgresql/pgx/v4/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/alias/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/alias/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/alias/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/alias/postgresql/pgx/v5/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/alias/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/alias/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/alias/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/alias/postgresql/stdlib/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/alias/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/alias/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/alias/sqlite/go/models.go b/internal/endtoend/testdata/alias/sqlite/go/models.go
index 1c9863e88..2b98aa983 100644
--- a/internal/endtoend/testdata/alias/sqlite/go/models.go
+++ b/internal/endtoend/testdata/alias/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int64
 }
diff --git a/internal/endtoend/testdata/any/pgx/v4/go/models.go b/internal/endtoend/testdata/any/pgx/v4/go/models.go
index 1c9863e88..2b98aa983 100644
--- a/internal/endtoend/testdata/any/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/any/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int64
 }
diff --git a/internal/endtoend/testdata/any/pgx/v5/go/models.go b/internal/endtoend/testdata/any/pgx/v5/go/models.go
index 1c9863e88..2b98aa983 100644
--- a/internal/endtoend/testdata/any/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/any/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int64
 }
diff --git a/internal/endtoend/testdata/any/stdlib/go/models.go b/internal/endtoend/testdata/any/stdlib/go/models.go
index 1c9863e88..2b98aa983 100644
--- a/internal/endtoend/testdata/any/stdlib/go/models.go
+++ b/internal/endtoend/testdata/any/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int64
 }
diff --git a/internal/endtoend/testdata/array_in/pgx/v4/go/models.go b/internal/endtoend/testdata/array_in/pgx/v4/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/array_in/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/array_in/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/array_in/pgx/v5/go/models.go b/internal/endtoend/testdata/array_in/pgx/v5/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/array_in/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/array_in/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/array_in/stdlib/go/models.go b/internal/endtoend/testdata/array_in/stdlib/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/array_in/stdlib/go/models.go
+++ b/internal/endtoend/testdata/array_in/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/array_text/pgx/v4/go/models.go b/internal/endtoend/testdata/array_text/pgx/v4/go/models.go
index 956d72dc0..a0f2729a3 100644
--- a/internal/endtoend/testdata/array_text/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/array_text/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	Tags []string
 }
diff --git a/internal/endtoend/testdata/array_text/pgx/v5/go/models.go b/internal/endtoend/testdata/array_text/pgx/v5/go/models.go
index 956d72dc0..a0f2729a3 100644
--- a/internal/endtoend/testdata/array_text/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/array_text/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	Tags []string
 }
diff --git a/internal/endtoend/testdata/array_text/stdlib/go/models.go b/internal/endtoend/testdata/array_text/stdlib/go/models.go
index 956d72dc0..a0f2729a3 100644
--- a/internal/endtoend/testdata/array_text/stdlib/go/models.go
+++ b/internal/endtoend/testdata/array_text/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	Tags []string
 }
diff --git a/internal/endtoend/testdata/array_text_join/pgx/v4/go/models.go b/internal/endtoend/testdata/array_text_join/pgx/v4/go/models.go
index 2d2822aa2..58ebcefe1 100644
--- a/internal/endtoend/testdata/array_text_join/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/array_text_join/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID   string
 	Info []string
diff --git a/internal/endtoend/testdata/array_text_join/pgx/v5/go/models.go b/internal/endtoend/testdata/array_text_join/pgx/v5/go/models.go
index 2d2822aa2..58ebcefe1 100644
--- a/internal/endtoend/testdata/array_text_join/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/array_text_join/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID   string
 	Info []string
diff --git a/internal/endtoend/testdata/array_text_join/stdlib/go/models.go b/internal/endtoend/testdata/array_text_join/stdlib/go/models.go
index 2d2822aa2..58ebcefe1 100644
--- a/internal/endtoend/testdata/array_text_join/stdlib/go/models.go
+++ b/internal/endtoend/testdata/array_text_join/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID   string
 	Info []string
diff --git a/internal/endtoend/testdata/batch/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/batch/postgresql/pgx/v4/go/query.sql.go
index e7e559e18..c7ef64229 100644
--- a/internal/endtoend/testdata/batch/postgresql/pgx/v4/go/query.sql.go
+++ b/internal/endtoend/testdata/batch/postgresql/pgx/v4/go/query.sql.go
@@ -4,5 +4,3 @@
 // source: query.sql
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/batch/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/batch/postgresql/pgx/v5/go/query.sql.go
index e7e559e18..c7ef64229 100644
--- a/internal/endtoend/testdata/batch/postgresql/pgx/v5/go/query.sql.go
+++ b/internal/endtoend/testdata/batch/postgresql/pgx/v5/go/query.sql.go
@@ -4,5 +4,3 @@
 // source: query.sql
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/query.sql.go
index e7e559e18..c7ef64229 100644
--- a/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/query.sql.go
+++ b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/query.sql.go
@@ -4,5 +4,3 @@
 // source: query.sql
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/between_args/mysql/go/models.go b/internal/endtoend/testdata/between_args/mysql/go/models.go
index ea49934bf..dad2b5849 100644
--- a/internal/endtoend/testdata/between_args/mysql/go/models.go
+++ b/internal/endtoend/testdata/between_args/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Product struct {
 	ID    int64
 	Name  string
diff --git a/internal/endtoend/testdata/between_args/sqlite/go/models.go b/internal/endtoend/testdata/between_args/sqlite/go/models.go
index bcf08d872..3735b93eb 100644
--- a/internal/endtoend/testdata/between_args/sqlite/go/models.go
+++ b/internal/endtoend/testdata/between_args/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Product struct {
 	Name  string
 	Price int64
diff --git a/internal/endtoend/testdata/builtins/postgresql/go/models.go b/internal/endtoend/testdata/builtins/postgresql/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/builtins/postgresql/go/models.go
+++ b/internal/endtoend/testdata/builtins/postgresql/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/builtins/sqlite/go/models.go b/internal/endtoend/testdata/builtins/sqlite/go/models.go
index a5de5ef58..62e26c31f 100644
--- a/internal/endtoend/testdata/builtins/sqlite/go/models.go
+++ b/internal/endtoend/testdata/builtins/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Test struct {
 	ID      int64
 	IntVal  int64
diff --git a/internal/endtoend/testdata/case_stmt_bool/pgx/v4/go/models.go b/internal/endtoend/testdata/case_stmt_bool/pgx/v4/go/models.go
index 42851da25..c60367c57 100644
--- a/internal/endtoend/testdata/case_stmt_bool/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/case_stmt_bool/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/case_stmt_bool/pgx/v5/go/models.go b/internal/endtoend/testdata/case_stmt_bool/pgx/v5/go/models.go
index 42851da25..c60367c57 100644
--- a/internal/endtoend/testdata/case_stmt_bool/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/case_stmt_bool/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/case_stmt_bool/stdlib/go/models.go b/internal/endtoend/testdata/case_stmt_bool/stdlib/go/models.go
index 42851da25..c60367c57 100644
--- a/internal/endtoend/testdata/case_stmt_bool/stdlib/go/models.go
+++ b/internal/endtoend/testdata/case_stmt_bool/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/case_text/pgx/v4/go/models.go b/internal/endtoend/testdata/case_text/pgx/v4/go/models.go
index 42851da25..c60367c57 100644
--- a/internal/endtoend/testdata/case_text/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/case_text/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/case_text/pgx/v5/go/models.go b/internal/endtoend/testdata/case_text/pgx/v5/go/models.go
index 42851da25..c60367c57 100644
--- a/internal/endtoend/testdata/case_text/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/case_text/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/case_text/stdlib/go/models.go b/internal/endtoend/testdata/case_text/stdlib/go/models.go
index 42851da25..c60367c57 100644
--- a/internal/endtoend/testdata/case_text/stdlib/go/models.go
+++ b/internal/endtoend/testdata/case_text/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/coalesce_join/postgresql/go/models.go b/internal/endtoend/testdata/coalesce_join/postgresql/go/models.go
index 25f7e01a0..873569996 100644
--- a/internal/endtoend/testdata/coalesce_join/postgresql/go/models.go
+++ b/internal/endtoend/testdata/coalesce_join/postgresql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int64
 }
diff --git a/internal/endtoend/testdata/column_as/mysql/go/models.go b/internal/endtoend/testdata/column_as/mysql/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/column_as/mysql/go/models.go
+++ b/internal/endtoend/testdata/column_as/mysql/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/column_as/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/column_as/postgresql/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/column_as/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/column_as/postgresql/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/column_as/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/column_as/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/column_as/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/column_as/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/column_as/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/column_as/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/column_as/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/column_as/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/column_as/sqlite/go/models.go b/internal/endtoend/testdata/column_as/sqlite/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/column_as/sqlite/go/models.go
+++ b/internal/endtoend/testdata/column_as/sqlite/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/comparisons/mysql/go/models.go b/internal/endtoend/testdata/comparisons/mysql/go/models.go
index 640094aa5..3fe613c68 100644
--- a/internal/endtoend/testdata/comparisons/mysql/go/models.go
+++ b/internal/endtoend/testdata/comparisons/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID uint64
 }
diff --git a/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/comparisons/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/comparisons/postgresql/stdlib/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/comparisons/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/comparisons/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/comparisons/sqlite/go/models.go b/internal/endtoend/testdata/comparisons/sqlite/go/models.go
index 1c9863e88..2b98aa983 100644
--- a/internal/endtoend/testdata/comparisons/sqlite/go/models.go
+++ b/internal/endtoend/testdata/comparisons/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int64
 }
diff --git a/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/models.go b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/models.go
index 15e7e52d2..fb996c55a 100644
--- a/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/models.go
+++ b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type UserDatum struct {
 	ID   string
 	User string
diff --git a/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/query.sql.go
index fbf6d0700..7227f4096 100644
--- a/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/query.sql.go
+++ b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/query.sql.go
@@ -5,8 +5,6 @@
 
 package querytest
 
-import ()
-
 type StageUserDataParams struct {
 	IDParam   string
 	UserParam string
diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/models.go
index 23e5b24b1..825a682d6 100644
--- a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Author struct {
 	AuthorID int32
 }
diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/query.sql.go
index e7e559e18..c7ef64229 100644
--- a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/query.sql.go
+++ b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/query.sql.go
@@ -4,5 +4,3 @@
 // source: query.sql
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/models.go
index 23e5b24b1..825a682d6 100644
--- a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Author struct {
 	AuthorID int32
 }
diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/query.sql.go
index e7e559e18..c7ef64229 100644
--- a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/query.sql.go
+++ b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/query.sql.go
@@ -4,5 +4,3 @@
 // source: query.sql
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/count_star/mysql/go/models.go b/internal/endtoend/testdata/count_star/mysql/go/models.go
index 640094aa5..3fe613c68 100644
--- a/internal/endtoend/testdata/count_star/mysql/go/models.go
+++ b/internal/endtoend/testdata/count_star/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID uint64
 }
diff --git a/internal/endtoend/testdata/count_star/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/count_star/postgresql/pgx/v4/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/count_star/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/count_star/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/count_star/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/count_star/postgresql/pgx/v5/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/count_star/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/count_star/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/count_star/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/count_star/postgresql/stdlib/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/count_star/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/count_star/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/count_star/sqlite/go/models.go b/internal/endtoend/testdata/count_star/sqlite/go/models.go
index 1c9863e88..2b98aa983 100644
--- a/internal/endtoend/testdata/count_star/sqlite/go/models.go
+++ b/internal/endtoend/testdata/count_star/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int64
 }
diff --git a/internal/endtoend/testdata/create_materialized_view/postgresql/go/models.go b/internal/endtoend/testdata/create_materialized_view/postgresql/go/models.go
index b7940f62a..42ef635aa 100644
--- a/internal/endtoend/testdata/create_materialized_view/postgresql/go/models.go
+++ b/internal/endtoend/testdata/create_materialized_view/postgresql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Val string
 }
diff --git a/internal/endtoend/testdata/create_table_as/postgresql/go/models.go b/internal/endtoend/testdata/create_table_as/postgresql/go/models.go
index 6478bdc5a..967695948 100644
--- a/internal/endtoend/testdata/create_table_as/postgresql/go/models.go
+++ b/internal/endtoend/testdata/create_table_as/postgresql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Val string
 }
diff --git a/internal/endtoend/testdata/cte_count/mysql/go/models.go b/internal/endtoend/testdata/cte_count/mysql/go/models.go
index 3fc35ca51..0595fb0ce 100644
--- a/internal/endtoend/testdata/cte_count/mysql/go/models.go
+++ b/internal/endtoend/testdata/cte_count/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	Ready bool
 }
diff --git a/internal/endtoend/testdata/cte_count/pgx/v4/go/models.go b/internal/endtoend/testdata/cte_count/pgx/v4/go/models.go
index 3fc35ca51..0595fb0ce 100644
--- a/internal/endtoend/testdata/cte_count/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/cte_count/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	Ready bool
 }
diff --git a/internal/endtoend/testdata/cte_count/pgx/v5/go/models.go b/internal/endtoend/testdata/cte_count/pgx/v5/go/models.go
index 3fc35ca51..0595fb0ce 100644
--- a/internal/endtoend/testdata/cte_count/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/cte_count/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	Ready bool
 }
diff --git a/internal/endtoend/testdata/cte_count/stdlib/go/models.go b/internal/endtoend/testdata/cte_count/stdlib/go/models.go
index 3fc35ca51..0595fb0ce 100644
--- a/internal/endtoend/testdata/cte_count/stdlib/go/models.go
+++ b/internal/endtoend/testdata/cte_count/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	Ready bool
 }
diff --git a/internal/endtoend/testdata/cte_filter/mysql/go/models.go b/internal/endtoend/testdata/cte_filter/mysql/go/models.go
index 3fc35ca51..0595fb0ce 100644
--- a/internal/endtoend/testdata/cte_filter/mysql/go/models.go
+++ b/internal/endtoend/testdata/cte_filter/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	Ready bool
 }
diff --git a/internal/endtoend/testdata/cte_filter/pgx/v4/go/models.go b/internal/endtoend/testdata/cte_filter/pgx/v4/go/models.go
index 3fc35ca51..0595fb0ce 100644
--- a/internal/endtoend/testdata/cte_filter/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/cte_filter/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	Ready bool
 }
diff --git a/internal/endtoend/testdata/cte_filter/pgx/v5/go/models.go b/internal/endtoend/testdata/cte_filter/pgx/v5/go/models.go
index 3fc35ca51..0595fb0ce 100644
--- a/internal/endtoend/testdata/cte_filter/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/cte_filter/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	Ready bool
 }
diff --git a/internal/endtoend/testdata/cte_filter/stdlib/go/models.go b/internal/endtoend/testdata/cte_filter/stdlib/go/models.go
index 3fc35ca51..0595fb0ce 100644
--- a/internal/endtoend/testdata/cte_filter/stdlib/go/models.go
+++ b/internal/endtoend/testdata/cte_filter/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	Ready bool
 }
diff --git a/internal/endtoend/testdata/cte_in_delete/mysql/go/models.go b/internal/endtoend/testdata/cte_in_delete/mysql/go/models.go
index ee7b04908..b7e75714b 100644
--- a/internal/endtoend/testdata/cte_in_delete/mysql/go/models.go
+++ b/internal/endtoend/testdata/cte_in_delete/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID    int32
 	Ready bool
diff --git a/internal/endtoend/testdata/cte_in_delete/pgx/v4/go/models.go b/internal/endtoend/testdata/cte_in_delete/pgx/v4/go/models.go
index ee7b04908..b7e75714b 100644
--- a/internal/endtoend/testdata/cte_in_delete/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/cte_in_delete/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID    int32
 	Ready bool
diff --git a/internal/endtoend/testdata/cte_in_delete/pgx/v5/go/models.go b/internal/endtoend/testdata/cte_in_delete/pgx/v5/go/models.go
index ee7b04908..b7e75714b 100644
--- a/internal/endtoend/testdata/cte_in_delete/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/cte_in_delete/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID    int32
 	Ready bool
diff --git a/internal/endtoend/testdata/cte_in_delete/stdlib/go/models.go b/internal/endtoend/testdata/cte_in_delete/stdlib/go/models.go
index ee7b04908..b7e75714b 100644
--- a/internal/endtoend/testdata/cte_in_delete/stdlib/go/models.go
+++ b/internal/endtoend/testdata/cte_in_delete/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID    int32
 	Ready bool
diff --git a/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/models.go
+++ b/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/models.go
+++ b/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/cte_update/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_update/postgresql/pgx/go/models.go
index cccdc27f9..642b4d039 100644
--- a/internal/endtoend/testdata/cte_update/postgresql/pgx/go/models.go
+++ b/internal/endtoend/testdata/cte_update/postgresql/pgx/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Attribute struct {
 	ID   int64
 	Name string
diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v4/go/models.go
index 3542b985b..5f47aff0c 100644
--- a/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar string
 	Baz string
diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v5/go/models.go
index 3542b985b..5f47aff0c 100644
--- a/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar string
 	Baz string
diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/stdlib/go/models.go
index 3542b985b..5f47aff0c 100644
--- a/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar string
 	Baz string
diff --git a/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v4/go/models.go
index 88d8c7ef3..61d37b2e1 100644
--- a/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar []string
 }
diff --git a/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v5/go/models.go
index 88d8c7ef3..61d37b2e1 100644
--- a/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar []string
 }
diff --git a/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/stdlib/go/models.go
index 88d8c7ef3..61d37b2e1 100644
--- a/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar []string
 }
diff --git a/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v4/go/models.go
index 9429aee53..7ff33775e 100644
--- a/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Baz string
 }
diff --git a/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v5/go/models.go
index 9429aee53..7ff33775e 100644
--- a/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Baz string
 }
diff --git a/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/stdlib/go/models.go
index 9429aee53..7ff33775e 100644
--- a/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Baz string
 }
diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/go/models.go b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/go/models.go
index ce74d444c..87861df6a 100644
--- a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/go/models.go
+++ b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/go/models.go
@@ -4,7 +4,5 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 }
diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v4/go/models.go
index ce74d444c..87861df6a 100644
--- a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v4/go/models.go
@@ -4,7 +4,5 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 }
diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v5/go/models.go
index ce74d444c..87861df6a 100644
--- a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v5/go/models.go
@@ -4,7 +4,5 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 }
diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/stdlib/go/models.go
index ce74d444c..87861df6a 100644
--- a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/stdlib/go/models.go
@@ -4,7 +4,5 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 }
diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/go/models.go b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/go/models.go
index 7232d4ec5..1ff13b4d3 100644
--- a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/go/models.go
+++ b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Venue struct {
 	ID uint64
 }
diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v4/go/models.go
index 76fbbe4b7..f3e23f468 100644
--- a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Venue struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v5/go/models.go
index 76fbbe4b7..f3e23f468 100644
--- a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Venue struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/stdlib/go/models.go
index 76fbbe4b7..f3e23f468 100644
--- a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Venue struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_alter_table_set_not_null/mysql/go/models.go b/internal/endtoend/testdata/ddl_alter_table_set_not_null/mysql/go/models.go
index 5688357fa..5fe55b748 100644
--- a/internal/endtoend/testdata/ddl_alter_table_set_not_null/mysql/go/models.go
+++ b/internal/endtoend/testdata/ddl_alter_table_set_not_null/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar string
 }
diff --git a/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v4/go/models.go
index 5688357fa..5fe55b748 100644
--- a/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar string
 }
diff --git a/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v5/go/models.go
index 5688357fa..5fe55b748 100644
--- a/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar string
 }
diff --git a/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/stdlib/go/models.go
index 5688357fa..5fe55b748 100644
--- a/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar string
 }
diff --git a/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_create_function/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_create_function/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_create_function/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/ddl_create_function/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_create_function_args/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_create_function_args/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_create_function_args/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/ddl_create_function_args/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_create_function_return/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_create_function_return/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_create_function_return/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/ddl_create_function_return/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_create_function_types/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_create_function_types/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_create_function_types/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/ddl_create_function_types/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/go/models.go b/internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/go/models.go
index 5ed16e7a1..dcd5604c0 100644
--- a/internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/go/models.go
+++ b/internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Change struct {
 	Ranked int32
 }
diff --git a/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_function/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_drop_function/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_function/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_function/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_function_args/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_drop_function_args/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_function_args/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_function_args/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_schema/mysql/go/models.go b/internal/endtoend/testdata/ddl_drop_schema/mysql/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_schema/mysql/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_schema/mysql/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_schema/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_drop_schema/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_schema/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_schema/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_table/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_drop_table/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_table/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_table/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_table/sqlite/go/models.go b/internal/endtoend/testdata/ddl_drop_table/sqlite/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_table/sqlite/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_table/sqlite/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_table_if_exists/sqlite/go/models.go b/internal/endtoend/testdata/ddl_drop_table_if_exists/sqlite/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_table_if_exists/sqlite/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_table_if_exists/sqlite/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_type/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_drop_type/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_type/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_type/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/delete_from/mysql/go/models.go b/internal/endtoend/testdata/delete_from/mysql/go/models.go
index 42851da25..c60367c57 100644
--- a/internal/endtoend/testdata/delete_from/mysql/go/models.go
+++ b/internal/endtoend/testdata/delete_from/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/go/models.go
index 42851da25..c60367c57 100644
--- a/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/go/models.go
index 42851da25..c60367c57 100644
--- a/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/delete_from/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/delete_from/postgresql/stdlib/go/models.go
index 42851da25..c60367c57 100644
--- a/internal/endtoend/testdata/delete_from/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/delete_from/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/delete_from/sqlite/go/models.go b/internal/endtoend/testdata/delete_from/sqlite/go/models.go
index 42851da25..c60367c57 100644
--- a/internal/endtoend/testdata/delete_from/sqlite/go/models.go
+++ b/internal/endtoend/testdata/delete_from/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/delete_inner_join/mysql/go/models.go b/internal/endtoend/testdata/delete_inner_join/mysql/go/models.go
index e0c8a661b..d788f51f1 100644
--- a/internal/endtoend/testdata/delete_inner_join/mysql/go/models.go
+++ b/internal/endtoend/testdata/delete_inner_join/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Author struct {
 	ID   uint32
 	Name string
diff --git a/internal/endtoend/testdata/delete_join/mysql/db/models.go b/internal/endtoend/testdata/delete_join/mysql/db/models.go
index f7dbfd4f2..8e95397a4 100644
--- a/internal/endtoend/testdata/delete_join/mysql/db/models.go
+++ b/internal/endtoend/testdata/delete_join/mysql/db/models.go
@@ -4,8 +4,6 @@
 
 package db
 
-import ()
-
 type JoinTable struct {
 	ID             uint64
 	PrimaryTableID uint64
diff --git a/internal/endtoend/testdata/emit_empty_slices/pgx/v4/go/models.go b/internal/endtoend/testdata/emit_empty_slices/pgx/v4/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/emit_empty_slices/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/emit_empty_slices/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/emit_empty_slices/pgx/v5/go/models.go b/internal/endtoend/testdata/emit_empty_slices/pgx/v5/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/emit_empty_slices/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/emit_empty_slices/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/emit_empty_slices/stdlib/go/models.go b/internal/endtoend/testdata/emit_empty_slices/stdlib/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/emit_empty_slices/stdlib/go/models.go
+++ b/internal/endtoend/testdata/emit_empty_slices/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/emit_exported_queries/pgx/v4/go/models.go b/internal/endtoend/testdata/emit_exported_queries/pgx/v4/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/emit_exported_queries/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/emit_exported_queries/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/emit_exported_queries/pgx/v5/go/models.go b/internal/endtoend/testdata/emit_exported_queries/pgx/v5/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/emit_exported_queries/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/emit_exported_queries/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/emit_exported_queries/stdlib/go/models.go b/internal/endtoend/testdata/emit_exported_queries/stdlib/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/emit_exported_queries/stdlib/go/models.go
+++ b/internal/endtoend/testdata/emit_exported_queries/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/emit_sql_as_comment/stdlib/go/models.go b/internal/endtoend/testdata/emit_sql_as_comment/stdlib/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/emit_sql_as_comment/stdlib/go/models.go
+++ b/internal/endtoend/testdata/emit_sql_as_comment/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/exec_create_table/mysql/db/models.go b/internal/endtoend/testdata/exec_create_table/mysql/db/models.go
index 7e011682c..367a5ee05 100644
--- a/internal/endtoend/testdata/exec_create_table/mysql/db/models.go
+++ b/internal/endtoend/testdata/exec_create_table/mysql/db/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package db
-
-import ()
diff --git a/internal/endtoend/testdata/exec_create_table/postgresql/db/models.go b/internal/endtoend/testdata/exec_create_table/postgresql/db/models.go
index 7e011682c..367a5ee05 100644
--- a/internal/endtoend/testdata/exec_create_table/postgresql/db/models.go
+++ b/internal/endtoend/testdata/exec_create_table/postgresql/db/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package db
-
-import ()
diff --git a/internal/endtoend/testdata/exec_create_table/sqlite/db/models.go b/internal/endtoend/testdata/exec_create_table/sqlite/db/models.go
index 7e011682c..367a5ee05 100644
--- a/internal/endtoend/testdata/exec_create_table/sqlite/db/models.go
+++ b/internal/endtoend/testdata/exec_create_table/sqlite/db/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package db
-
-import ()
diff --git a/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/models.go b/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/models.go
+++ b/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/models.go b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/models.go b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/go/models.go b/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/go/models.go
+++ b/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/models.go b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/models.go b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/go/models.go b/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/go/models.go
+++ b/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/full_outer_join/sqlite/go/models.go b/internal/endtoend/testdata/full_outer_join/sqlite/go/models.go
index acbf0633b..b0bab2b68 100644
--- a/internal/endtoend/testdata/full_outer_join/sqlite/go/models.go
+++ b/internal/endtoend/testdata/full_outer_join/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Author struct {
 	ID   int64
 	Name string
diff --git a/internal/endtoend/testdata/func_args/pgx/v4/go/models.go b/internal/endtoend/testdata/func_args/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/func_args/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/func_args/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/func_args/pgx/v5/go/models.go b/internal/endtoend/testdata/func_args/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/func_args/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/func_args/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/func_args/stdlib/go/models.go b/internal/endtoend/testdata/func_args/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/func_args/stdlib/go/models.go
+++ b/internal/endtoend/testdata/func_args/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/func_args_typecast/pgx/v4/go/models.go b/internal/endtoend/testdata/func_args_typecast/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/func_args_typecast/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/func_args_typecast/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/func_args_typecast/pgx/v5/go/models.go b/internal/endtoend/testdata/func_args_typecast/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/func_args_typecast/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/func_args_typecast/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/func_args_typecast/stdlib/go/models.go b/internal/endtoend/testdata/func_args_typecast/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/func_args_typecast/stdlib/go/models.go
+++ b/internal/endtoend/testdata/func_args_typecast/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/func_call_cast/mysql/go/models.go b/internal/endtoend/testdata/func_call_cast/mysql/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/func_call_cast/mysql/go/models.go
+++ b/internal/endtoend/testdata/func_call_cast/mysql/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/func_call_cast/sqlite/go/models.go b/internal/endtoend/testdata/func_call_cast/sqlite/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/func_call_cast/sqlite/go/models.go
+++ b/internal/endtoend/testdata/func_call_cast/sqlite/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/func_match_types/mysql/go/models.go b/internal/endtoend/testdata/func_match_types/mysql/go/models.go
index 1f2c1a05e..31f13a1ba 100644
--- a/internal/endtoend/testdata/func_match_types/mysql/go/models.go
+++ b/internal/endtoend/testdata/func_match_types/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Book struct {
 	ID     int32
 	Title  string
diff --git a/internal/endtoend/testdata/func_match_types/postgresql/go/models.go b/internal/endtoend/testdata/func_match_types/postgresql/go/models.go
index 1f2c1a05e..31f13a1ba 100644
--- a/internal/endtoend/testdata/func_match_types/postgresql/go/models.go
+++ b/internal/endtoend/testdata/func_match_types/postgresql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Book struct {
 	ID     int32
 	Title  string
diff --git a/internal/endtoend/testdata/func_match_types/sqlite/go/models.go b/internal/endtoend/testdata/func_match_types/sqlite/go/models.go
index 9715875ac..a9c9c06ab 100644
--- a/internal/endtoend/testdata/func_match_types/sqlite/go/models.go
+++ b/internal/endtoend/testdata/func_match_types/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Book struct {
 	ID     int64
 	Title  string
diff --git a/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/models.go b/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/models.go
+++ b/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/models.go b/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/models.go
index 932fa80b1..ed50c91f9 100644
--- a/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/models.go
+++ b/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type MyTable struct {
 	Data []byte
 }
diff --git a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/models.go b/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/models.go
index 12c2978a0..90eb7ab36 100644
--- a/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/models.go
+++ b/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Account struct {
 	ID       int32
 	Username string
diff --git a/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/models.go b/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/models.go
index 6245c4717..15b5fa107 100644
--- a/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/models.go
+++ b/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Blog struct {
 	ID   int32
 	Name string
diff --git a/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/models.go b/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/models.go
+++ b/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/golang_invalid_sql_driver/db/db.go b/internal/endtoend/testdata/golang_invalid_sql_driver/db/db.go
new file mode 100644
index 000000000..bdb151c18
--- /dev/null
+++ b/internal/endtoend/testdata/golang_invalid_sql_driver/db/db.go
@@ -0,0 +1,31 @@
+// Code generated by sqlc. DO NOT EDIT.
+// versions:
+//   sqlc v1.25.0
+
+package db
+
+import (
+	"context"
+	"database/sql"
+)
+
+type DBTX interface {
+	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
+	PrepareContext(context.Context, string) (*sql.Stmt, error)
+	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
+	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
+}
+
+func New(db DBTX) *Queries {
+	return &Queries{db: db}
+}
+
+type Queries struct {
+	db DBTX
+}
+
+func (q *Queries) WithTx(tx *sql.Tx) *Queries {
+	return &Queries{
+		db: tx,
+	}
+}
diff --git a/internal/endtoend/testdata/golang_invalid_sql_driver/db/models.go b/internal/endtoend/testdata/golang_invalid_sql_driver/db/models.go
new file mode 100644
index 000000000..a1065e0b7
--- /dev/null
+++ b/internal/endtoend/testdata/golang_invalid_sql_driver/db/models.go
@@ -0,0 +1,13 @@
+// Code generated by sqlc. DO NOT EDIT.
+// versions:
+//   sqlc v1.25.0
+
+package db
+
+import (
+	"database/sql"
+)
+
+type Foo struct {
+	Bar sql.NullString
+}
diff --git a/internal/endtoend/testdata/golang_invalid_sql_driver/db/query.sql.go b/internal/endtoend/testdata/golang_invalid_sql_driver/db/query.sql.go
new file mode 100644
index 000000000..242b7393b
--- /dev/null
+++ b/internal/endtoend/testdata/golang_invalid_sql_driver/db/query.sql.go
@@ -0,0 +1,38 @@
+// Code generated by sqlc. DO NOT EDIT.
+// versions:
+//   sqlc v1.25.0
+// source: query.sql
+
+package db
+
+import (
+	"context"
+	"database/sql"
+)
+
+const selectFoo = `-- name: SelectFoo :many
+SELECT bar FROM foo
+`
+
+func (q *Queries) SelectFoo(ctx context.Context) ([]sql.NullString, error) {
+	rows, err := q.db.QueryContext(ctx, selectFoo)
+	if err != nil {
+		return nil, err
+	}
+	defer rows.Close()
+	var items []sql.NullString
+	for rows.Next() {
+		var bar sql.NullString
+		if err := rows.Scan(&bar); err != nil {
+			return nil, err
+		}
+		items = append(items, bar)
+	}
+	if err := rows.Close(); err != nil {
+		return nil, err
+	}
+	if err := rows.Err(); err != nil {
+		return nil, err
+	}
+	return items, nil
+}
diff --git a/internal/endtoend/testdata/golang_invalid_sql_driver/query.sql b/internal/endtoend/testdata/golang_invalid_sql_driver/query.sql
new file mode 100644
index 000000000..e32e926b3
--- /dev/null
+++ b/internal/endtoend/testdata/golang_invalid_sql_driver/query.sql
@@ -0,0 +1,2 @@
+-- name: SelectFoo :many
+SELECT * FROM foo;
diff --git a/internal/endtoend/testdata/golang_invalid_sql_driver/schema.sql b/internal/endtoend/testdata/golang_invalid_sql_driver/schema.sql
new file mode 100644
index 000000000..1bd72529f
--- /dev/null
+++ b/internal/endtoend/testdata/golang_invalid_sql_driver/schema.sql
@@ -0,0 +1,3 @@
+CREATE TABLE foo(
+        bar text
+);
diff --git a/internal/endtoend/testdata/golang_invalid_sql_driver/sqlc.json b/internal/endtoend/testdata/golang_invalid_sql_driver/sqlc.json
new file mode 100644
index 000000000..6124f178d
--- /dev/null
+++ b/internal/endtoend/testdata/golang_invalid_sql_driver/sqlc.json
@@ -0,0 +1,16 @@
+{
+    "version": "2",
+    "sql": [
+        {
+            "schema": "schema.sql",
+            "queries": "query.sql",
+            "engine": "postgresql",
+            "gen": {
+                "go": {
+                    "out": "db",
+                    "sql_driver": "github.com/unknown/driver"
+                }
+            }
+        }
+    ]
+}
diff --git a/internal/endtoend/testdata/golang_invalid_sql_driver/stderr.txt b/internal/endtoend/testdata/golang_invalid_sql_driver/stderr.txt
new file mode 100644
index 000000000..b71f130a2
--- /dev/null
+++ b/internal/endtoend/testdata/golang_invalid_sql_driver/stderr.txt
@@ -0,0 +1,2 @@
+# package 
+error generating code: invalid options: unknown SQL driver: github.com/unknown/driver
diff --git a/internal/endtoend/testdata/golang_invalid_sql_package/db/db.go b/internal/endtoend/testdata/golang_invalid_sql_package/db/db.go
new file mode 100644
index 000000000..bdb151c18
--- /dev/null
+++ b/internal/endtoend/testdata/golang_invalid_sql_package/db/db.go
@@ -0,0 +1,31 @@
+// Code generated by sqlc. DO NOT EDIT.
+// versions:
+//   sqlc v1.25.0
+
+package db
+
+import (
+	"context"
+	"database/sql"
+)
+
+type DBTX interface {
+	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
+	PrepareContext(context.Context, string) (*sql.Stmt, error)
+	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
+	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
+}
+
+func New(db DBTX) *Queries {
+	return &Queries{db: db}
+}
+
+type Queries struct {
+	db DBTX
+}
+
+func (q *Queries) WithTx(tx *sql.Tx) *Queries {
+	return &Queries{
+		db: tx,
+	}
+}
diff --git a/internal/endtoend/testdata/golang_invalid_sql_package/db/models.go b/internal/endtoend/testdata/golang_invalid_sql_package/db/models.go
new file mode 100644
index 000000000..a1065e0b7
--- /dev/null
+++ b/internal/endtoend/testdata/golang_invalid_sql_package/db/models.go
@@ -0,0 +1,13 @@
+// Code generated by sqlc. DO NOT EDIT.
+// versions:
+//   sqlc v1.25.0
+
+package db
+
+import (
+	"database/sql"
+)
+
+type Foo struct {
+	Bar sql.NullString
+}
diff --git a/internal/endtoend/testdata/golang_invalid_sql_package/db/query.sql.go b/internal/endtoend/testdata/golang_invalid_sql_package/db/query.sql.go
new file mode 100644
index 000000000..242b7393b
--- /dev/null
+++ b/internal/endtoend/testdata/golang_invalid_sql_package/db/query.sql.go
@@ -0,0 +1,38 @@
+// Code generated by sqlc. DO NOT EDIT.
+// versions:
+//   sqlc v1.25.0
+// source: query.sql
+
+package db
+
+import (
+	"context"
+	"database/sql"
+)
+
+const selectFoo = `-- name: SelectFoo :many
+SELECT bar FROM foo
+`
+
+func (q *Queries) SelectFoo(ctx context.Context) ([]sql.NullString, error) {
+	rows, err := q.db.QueryContext(ctx, selectFoo)
+	if err != nil {
+		return nil, err
+	}
+	defer rows.Close()
+	var items []sql.NullString
+	for rows.Next() {
+		var bar sql.NullString
+		if err := rows.Scan(&bar); err != nil {
+			return nil, err
+		}
+		items = append(items, bar)
+	}
+	if err := rows.Close(); err != nil {
+		return nil, err
+	}
+	if err := rows.Err(); err != nil {
+		return nil, err
+	}
+	return items, nil
+}
diff --git a/internal/endtoend/testdata/golang_invalid_sql_package/query.sql b/internal/endtoend/testdata/golang_invalid_sql_package/query.sql
new file mode 100644
index 000000000..e32e926b3
--- /dev/null
+++ b/internal/endtoend/testdata/golang_invalid_sql_package/query.sql
@@ -0,0 +1,2 @@
+-- name: SelectFoo :many
+SELECT * FROM foo;
diff --git a/internal/endtoend/testdata/golang_invalid_sql_package/schema.sql b/internal/endtoend/testdata/golang_invalid_sql_package/schema.sql
new file mode 100644
index 000000000..1bd72529f
--- /dev/null
+++ b/internal/endtoend/testdata/golang_invalid_sql_package/schema.sql
@@ -0,0 +1,3 @@
+CREATE TABLE foo(
+        bar text
+);
diff --git a/internal/endtoend/testdata/golang_invalid_sql_package/sqlc.json b/internal/endtoend/testdata/golang_invalid_sql_package/sqlc.json
new file mode 100644
index 000000000..a6c726061
--- /dev/null
+++ b/internal/endtoend/testdata/golang_invalid_sql_package/sqlc.json
@@ -0,0 +1,16 @@
+{
+    "version": "2",
+    "sql": [
+        {
+            "schema": "schema.sql",
+            "queries": "query.sql",
+            "engine": "postgresql",
+            "gen": {
+                "go": {
+                    "out": "db",
+                    "sql_package": "pgx/5"
+                }
+            }
+        }
+    ]
+}
diff --git a/internal/endtoend/testdata/golang_invalid_sql_package/stderr.txt b/internal/endtoend/testdata/golang_invalid_sql_package/stderr.txt
new file mode 100644
index 000000000..249ae167b
--- /dev/null
+++ b/internal/endtoend/testdata/golang_invalid_sql_package/stderr.txt
@@ -0,0 +1,2 @@
+# package 
+error generating code: invalid options: unknown SQL package: pgx/5
diff --git a/internal/endtoend/testdata/having/mysql/go/models.go b/internal/endtoend/testdata/having/mysql/go/models.go
index 01467f609..664720555 100644
--- a/internal/endtoend/testdata/having/mysql/go/models.go
+++ b/internal/endtoend/testdata/having/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Weather struct {
 	City   string
 	TempLo int32
diff --git a/internal/endtoend/testdata/having/postgresql/go/models.go b/internal/endtoend/testdata/having/postgresql/go/models.go
index 01467f609..664720555 100644
--- a/internal/endtoend/testdata/having/postgresql/go/models.go
+++ b/internal/endtoend/testdata/having/postgresql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Weather struct {
 	City   string
 	TempLo int32
diff --git a/internal/endtoend/testdata/hstore/stdlib/go/models.go b/internal/endtoend/testdata/hstore/stdlib/go/models.go
index 6f25e9d03..e702e59dd 100644
--- a/internal/endtoend/testdata/hstore/stdlib/go/models.go
+++ b/internal/endtoend/testdata/hstore/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package hstore
 
-import ()
-
 type Foo struct {
 	Bar interface{}
 	Baz interface{}
diff --git a/internal/endtoend/testdata/identical_tables/mysql/go/models.go b/internal/endtoend/testdata/identical_tables/mysql/go/models.go
index 82471f178..e50f672ff 100644
--- a/internal/endtoend/testdata/identical_tables/mysql/go/models.go
+++ b/internal/endtoend/testdata/identical_tables/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/go/models.go
index 82471f178..e50f672ff 100644
--- a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/go/models.go
index 82471f178..e50f672ff 100644
--- a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/identical_tables/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/identical_tables/postgresql/stdlib/go/models.go
index 82471f178..e50f672ff 100644
--- a/internal/endtoend/testdata/identical_tables/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/identical_tables/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/identical_tables/sqlite/go/models.go b/internal/endtoend/testdata/identical_tables/sqlite/go/models.go
index 82471f178..e50f672ff 100644
--- a/internal/endtoend/testdata/identical_tables/sqlite/go/models.go
+++ b/internal/endtoend/testdata/identical_tables/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/identifier_dollar_sign/db/models.go b/internal/endtoend/testdata/identifier_dollar_sign/db/models.go
index 7e011682c..367a5ee05 100644
--- a/internal/endtoend/testdata/identifier_dollar_sign/db/models.go
+++ b/internal/endtoend/testdata/identifier_dollar_sign/db/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package db
-
-import ()
diff --git a/internal/endtoend/testdata/inflection/mysql/go/models.go b/internal/endtoend/testdata/inflection/mysql/go/models.go
index 83cf6a45a..df43371f5 100644
--- a/internal/endtoend/testdata/inflection/mysql/go/models.go
+++ b/internal/endtoend/testdata/inflection/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Calorie struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/inflection/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/inflection/postgresql/pgx/v4/go/models.go
index 83cf6a45a..df43371f5 100644
--- a/internal/endtoend/testdata/inflection/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/inflection/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Calorie struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/inflection/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/inflection/postgresql/pgx/v5/go/models.go
index 83cf6a45a..df43371f5 100644
--- a/internal/endtoend/testdata/inflection/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/inflection/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Calorie struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/inflection/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/inflection/postgresql/stdlib/go/models.go
index 83cf6a45a..df43371f5 100644
--- a/internal/endtoend/testdata/inflection/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/inflection/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Calorie struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/inflection/sqlite/go/models.go b/internal/endtoend/testdata/inflection/sqlite/go/models.go
index 83cf6a45a..df43371f5 100644
--- a/internal/endtoend/testdata/inflection/sqlite/go/models.go
+++ b/internal/endtoend/testdata/inflection/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Calorie struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/go/models.go
index 0285550a8..a2112aad8 100644
--- a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID   int32
 	Name string
diff --git a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/go/models.go
index 0285550a8..a2112aad8 100644
--- a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID   int32
 	Name string
diff --git a/internal/endtoend/testdata/insert_select/mysql/go/models.go b/internal/endtoend/testdata/insert_select/mysql/go/models.go
index 442df85b8..a3bb8fbf7 100644
--- a/internal/endtoend/testdata/insert_select/mysql/go/models.go
+++ b/internal/endtoend/testdata/insert_select/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	Name  string
 	Ready bool
diff --git a/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/go/models.go
index 442df85b8..a3bb8fbf7 100644
--- a/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	Name  string
 	Ready bool
diff --git a/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/go/models.go
index 442df85b8..a3bb8fbf7 100644
--- a/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	Name  string
 	Ready bool
diff --git a/internal/endtoend/testdata/insert_select/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/insert_select/postgresql/stdlib/go/models.go
index 442df85b8..a3bb8fbf7 100644
--- a/internal/endtoend/testdata/insert_select/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/insert_select/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	Name  string
 	Ready bool
diff --git a/internal/endtoend/testdata/insert_select/sqlite/go/models.go b/internal/endtoend/testdata/insert_select/sqlite/go/models.go
index 442df85b8..a3bb8fbf7 100644
--- a/internal/endtoend/testdata/insert_select/sqlite/go/models.go
+++ b/internal/endtoend/testdata/insert_select/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	Name  string
 	Ready bool
diff --git a/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/models.go b/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/models.go
index a59d650a6..f0952c605 100644
--- a/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/models.go
+++ b/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Status struct {
 	ID   int32
 	Name string
diff --git a/internal/endtoend/testdata/interval/pgx/v4/go/models.go b/internal/endtoend/testdata/interval/pgx/v4/go/models.go
index d95d50098..fca1b178b 100644
--- a/internal/endtoend/testdata/interval/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/interval/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar      bool
 	Interval int64
diff --git a/internal/endtoend/testdata/interval/stdlib/go/models.go b/internal/endtoend/testdata/interval/stdlib/go/models.go
index d95d50098..fca1b178b 100644
--- a/internal/endtoend/testdata/interval/stdlib/go/models.go
+++ b/internal/endtoend/testdata/interval/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar      bool
 	Interval int64
diff --git a/internal/endtoend/testdata/join_clauses_order/postgresql/go/models.go b/internal/endtoend/testdata/join_clauses_order/postgresql/go/models.go
index e7f9ad094..5db8081dd 100644
--- a/internal/endtoend/testdata/join_clauses_order/postgresql/go/models.go
+++ b/internal/endtoend/testdata/join_clauses_order/postgresql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type A struct {
 	ID int64
 	A  string
diff --git a/internal/endtoend/testdata/join_from/mysql/go/models.go b/internal/endtoend/testdata/join_from/mysql/go/models.go
index 4ac08994d..42876591f 100644
--- a/internal/endtoend/testdata/join_from/mysql/go/models.go
+++ b/internal/endtoend/testdata/join_from/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	Login string
 }
diff --git a/internal/endtoend/testdata/join_from/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/join_from/postgresql/pgx/v4/go/models.go
index 4ac08994d..42876591f 100644
--- a/internal/endtoend/testdata/join_from/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/join_from/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	Login string
 }
diff --git a/internal/endtoend/testdata/join_from/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/join_from/postgresql/pgx/v5/go/models.go
index 4ac08994d..42876591f 100644
--- a/internal/endtoend/testdata/join_from/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/join_from/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	Login string
 }
diff --git a/internal/endtoend/testdata/join_from/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/join_from/postgresql/stdlib/go/models.go
index 4ac08994d..42876591f 100644
--- a/internal/endtoend/testdata/join_from/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/join_from/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	Login string
 }
diff --git a/internal/endtoend/testdata/join_from/sqlite/go/models.go b/internal/endtoend/testdata/join_from/sqlite/go/models.go
index 4ac08994d..42876591f 100644
--- a/internal/endtoend/testdata/join_from/sqlite/go/models.go
+++ b/internal/endtoend/testdata/join_from/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	Login string
 }
diff --git a/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/go/models.go
index 6f9ee0da2..45d9c0a9b 100644
--- a/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Email string
 }
diff --git a/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/models.go b/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/models.go
index 6f3c6e329..7778210b3 100644
--- a/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/models.go
+++ b/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	FooID int64
 	Info  string
diff --git a/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/go/models.go
index 6f9ee0da2..45d9c0a9b 100644
--- a/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Email string
 }
diff --git a/internal/endtoend/testdata/join_two_tables/mysql/go/models.go b/internal/endtoend/testdata/join_two_tables/mysql/go/models.go
index d93f940f0..023059081 100644
--- a/internal/endtoend/testdata/join_two_tables/mysql/go/models.go
+++ b/internal/endtoend/testdata/join_two_tables/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID uint64
 }
diff --git a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/go/models.go
index 928e874b5..5a0229359 100644
--- a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/go/models.go
index 928e874b5..5a0229359 100644
--- a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/go/models.go
index 928e874b5..5a0229359 100644
--- a/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/join_two_tables/sqlite/go/models.go b/internal/endtoend/testdata/join_two_tables/sqlite/go/models.go
index a32d11c89..4e760b063 100644
--- a/internal/endtoend/testdata/join_two_tables/sqlite/go/models.go
+++ b/internal/endtoend/testdata/join_two_tables/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int64
 }
diff --git a/internal/endtoend/testdata/join_using/postgresql/pgx/go/models.go b/internal/endtoend/testdata/join_using/postgresql/pgx/go/models.go
index d8816ca73..3162ea3b0 100644
--- a/internal/endtoend/testdata/join_using/postgresql/pgx/go/models.go
+++ b/internal/endtoend/testdata/join_using/postgresql/pgx/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type T1 struct {
 	Fk int32
 }
diff --git a/internal/endtoend/testdata/join_where_clause/mysql/go/models.go b/internal/endtoend/testdata/join_where_clause/mysql/go/models.go
index 22132c801..b13cac5d7 100644
--- a/internal/endtoend/testdata/join_where_clause/mysql/go/models.go
+++ b/internal/endtoend/testdata/join_where_clause/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID    uint64
 	Owner string
diff --git a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/go/models.go
index b7d1a5db3..fb46357be 100644
--- a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID    int32
 	Owner string
diff --git a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/go/models.go
index b7d1a5db3..fb46357be 100644
--- a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID    int32
 	Owner string
diff --git a/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/go/models.go
index b7d1a5db3..fb46357be 100644
--- a/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID    int32
 	Owner string
diff --git a/internal/endtoend/testdata/join_where_clause/sqlite/go/models.go b/internal/endtoend/testdata/join_where_clause/sqlite/go/models.go
index 03fde8a13..2219b9915 100644
--- a/internal/endtoend/testdata/join_where_clause/sqlite/go/models.go
+++ b/internal/endtoend/testdata/join_where_clause/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID    int64
 	Owner string
diff --git a/internal/endtoend/testdata/json/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/json/postgresql/pgx/v5/go/models.go
index 2cc9ab4ee..a8a4cc408 100644
--- a/internal/endtoend/testdata/json/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/json/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	A []byte
 	B []byte
diff --git a/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/models.go b/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/models.go
index 10f721455..bccb6513d 100644
--- a/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/models.go
+++ b/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type SysAction struct {
 	ID        int64
 	Code      string
diff --git a/internal/endtoend/testdata/json_build/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/json_build/postgresql/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/json_build/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/json_build/postgresql/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/json_build/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/json_build/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/json_build/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/json_build/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/json_build/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/json_build/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/json_build/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/json_build/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/models.go b/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/models.go
index b065b6c53..b6af13569 100644
--- a/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/models.go
+++ b/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type User struct {
 	ID       int32
 	Metadata []byte
diff --git a/internal/endtoend/testdata/limit/mysql/go/models.go b/internal/endtoend/testdata/limit/mysql/go/models.go
index b1608efcd..53229f5e5 100644
--- a/internal/endtoend/testdata/limit/mysql/go/models.go
+++ b/internal/endtoend/testdata/limit/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar bool
 }
diff --git a/internal/endtoend/testdata/limit/pgx/v4/go/models.go b/internal/endtoend/testdata/limit/pgx/v4/go/models.go
index b1608efcd..53229f5e5 100644
--- a/internal/endtoend/testdata/limit/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/limit/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar bool
 }
diff --git a/internal/endtoend/testdata/limit/pgx/v5/go/models.go b/internal/endtoend/testdata/limit/pgx/v5/go/models.go
index b1608efcd..53229f5e5 100644
--- a/internal/endtoend/testdata/limit/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/limit/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar bool
 }
diff --git a/internal/endtoend/testdata/limit/sqlite/go/models.go b/internal/endtoend/testdata/limit/sqlite/go/models.go
index b1608efcd..53229f5e5 100644
--- a/internal/endtoend/testdata/limit/sqlite/go/models.go
+++ b/internal/endtoend/testdata/limit/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar bool
 }
diff --git a/internal/endtoend/testdata/limit/stdlib/go/models.go b/internal/endtoend/testdata/limit/stdlib/go/models.go
index b1608efcd..53229f5e5 100644
--- a/internal/endtoend/testdata/limit/stdlib/go/models.go
+++ b/internal/endtoend/testdata/limit/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar bool
 }
diff --git a/internal/endtoend/testdata/lower/pgx/v4/go/models.go b/internal/endtoend/testdata/lower/pgx/v4/go/models.go
index 789e535dc..25f32c031 100644
--- a/internal/endtoend/testdata/lower/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/lower/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar string
 	Bat string
diff --git a/internal/endtoend/testdata/lower/pgx/v5/go/models.go b/internal/endtoend/testdata/lower/pgx/v5/go/models.go
index 789e535dc..25f32c031 100644
--- a/internal/endtoend/testdata/lower/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/lower/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar string
 	Bat string
diff --git a/internal/endtoend/testdata/lower/stdlib/go/models.go b/internal/endtoend/testdata/lower/stdlib/go/models.go
index 789e535dc..25f32c031 100644
--- a/internal/endtoend/testdata/lower/stdlib/go/models.go
+++ b/internal/endtoend/testdata/lower/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar string
 	Bat string
diff --git a/internal/endtoend/testdata/lower_switched_order/pgx/v4/go/models.go b/internal/endtoend/testdata/lower_switched_order/pgx/v4/go/models.go
index 789e535dc..25f32c031 100644
--- a/internal/endtoend/testdata/lower_switched_order/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/lower_switched_order/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar string
 	Bat string
diff --git a/internal/endtoend/testdata/lower_switched_order/pgx/v5/go/models.go b/internal/endtoend/testdata/lower_switched_order/pgx/v5/go/models.go
index 789e535dc..25f32c031 100644
--- a/internal/endtoend/testdata/lower_switched_order/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/lower_switched_order/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar string
 	Bat string
diff --git a/internal/endtoend/testdata/lower_switched_order/stdlib/go/models.go b/internal/endtoend/testdata/lower_switched_order/stdlib/go/models.go
index 789e535dc..25f32c031 100644
--- a/internal/endtoend/testdata/lower_switched_order/stdlib/go/models.go
+++ b/internal/endtoend/testdata/lower_switched_order/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar string
 	Bat string
diff --git a/internal/endtoend/testdata/mathmatical_operator/pgx/v4/go/models.go b/internal/endtoend/testdata/mathmatical_operator/pgx/v4/go/models.go
index 093ce5f45..1367bdb7d 100644
--- a/internal/endtoend/testdata/mathmatical_operator/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/mathmatical_operator/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Num int32
 }
diff --git a/internal/endtoend/testdata/mathmatical_operator/pgx/v5/go/models.go b/internal/endtoend/testdata/mathmatical_operator/pgx/v5/go/models.go
index 093ce5f45..1367bdb7d 100644
--- a/internal/endtoend/testdata/mathmatical_operator/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/mathmatical_operator/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Num int32
 }
diff --git a/internal/endtoend/testdata/mathmatical_operator/stdlib/go/models.go b/internal/endtoend/testdata/mathmatical_operator/stdlib/go/models.go
index 093ce5f45..1367bdb7d 100644
--- a/internal/endtoend/testdata/mathmatical_operator/stdlib/go/models.go
+++ b/internal/endtoend/testdata/mathmatical_operator/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Num int32
 }
diff --git a/internal/endtoend/testdata/mix_param_types/mysql/go/models.go b/internal/endtoend/testdata/mix_param_types/mysql/go/models.go
index b7406201c..428fae3d8 100644
--- a/internal/endtoend/testdata/mix_param_types/mysql/go/models.go
+++ b/internal/endtoend/testdata/mix_param_types/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID    uint64
 	Name  string
diff --git a/internal/endtoend/testdata/mix_param_types/postgresql/go/models.go b/internal/endtoend/testdata/mix_param_types/postgresql/go/models.go
index e0ca50a2b..70ec43c30 100644
--- a/internal/endtoend/testdata/mix_param_types/postgresql/go/models.go
+++ b/internal/endtoend/testdata/mix_param_types/postgresql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID    int32
 	Name  string
diff --git a/internal/endtoend/testdata/multidimension_array/pgx/v4/go/models.go b/internal/endtoend/testdata/multidimension_array/pgx/v4/go/models.go
index 59d8735c6..a5531f7f2 100644
--- a/internal/endtoend/testdata/multidimension_array/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/multidimension_array/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	Tags [][]string
 }
diff --git a/internal/endtoend/testdata/multidimension_array/pgx/v5/go/models.go b/internal/endtoend/testdata/multidimension_array/pgx/v5/go/models.go
index 59d8735c6..a5531f7f2 100644
--- a/internal/endtoend/testdata/multidimension_array/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/multidimension_array/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	Tags [][]string
 }
diff --git a/internal/endtoend/testdata/multidimension_array/stdlib/go/models.go b/internal/endtoend/testdata/multidimension_array/stdlib/go/models.go
index 59d8735c6..a5531f7f2 100644
--- a/internal/endtoend/testdata/multidimension_array/stdlib/go/models.go
+++ b/internal/endtoend/testdata/multidimension_array/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	Tags [][]string
 }
diff --git a/internal/endtoend/testdata/named_param/pgx/v4/go/models.go b/internal/endtoend/testdata/named_param/pgx/v4/go/models.go
index e9b20b4a1..c7e8e6707 100644
--- a/internal/endtoend/testdata/named_param/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/named_param/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Name string
 	Bio  string
diff --git a/internal/endtoend/testdata/named_param/pgx/v5/go/models.go b/internal/endtoend/testdata/named_param/pgx/v5/go/models.go
index e9b20b4a1..c7e8e6707 100644
--- a/internal/endtoend/testdata/named_param/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/named_param/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Name string
 	Bio  string
diff --git a/internal/endtoend/testdata/named_param/sqlite/go/models.go b/internal/endtoend/testdata/named_param/sqlite/go/models.go
index e9b20b4a1..c7e8e6707 100644
--- a/internal/endtoend/testdata/named_param/sqlite/go/models.go
+++ b/internal/endtoend/testdata/named_param/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Name string
 	Bio  string
diff --git a/internal/endtoend/testdata/named_param/stdlib/go/models.go b/internal/endtoend/testdata/named_param/stdlib/go/models.go
index e9b20b4a1..c7e8e6707 100644
--- a/internal/endtoend/testdata/named_param/stdlib/go/models.go
+++ b/internal/endtoend/testdata/named_param/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Name string
 	Bio  string
diff --git a/internal/endtoend/testdata/nested_select/postgresql/pgx/go/models.go b/internal/endtoend/testdata/nested_select/postgresql/pgx/go/models.go
index 50d64c081..6fb33d4b9 100644
--- a/internal/endtoend/testdata/nested_select/postgresql/pgx/go/models.go
+++ b/internal/endtoend/testdata/nested_select/postgresql/pgx/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Test struct {
 	ID         int64
 	UpdateTime int64
diff --git a/internal/endtoend/testdata/nextval/postgresql/go/models.go b/internal/endtoend/testdata/nextval/postgresql/go/models.go
index 7b99d21e8..2e6915941 100644
--- a/internal/endtoend/testdata/nextval/postgresql/go/models.go
+++ b/internal/endtoend/testdata/nextval/postgresql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Author struct {
 	ID int64
 }
diff --git a/internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/models.go b/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/models.go
index 270ebe72a..19da390b9 100644
--- a/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/models.go
+++ b/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/models.go
@@ -4,8 +4,6 @@
 
 package db
 
-import ()
-
 type Author struct {
 	ID int64
 }
diff --git a/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/models.go b/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/models.go
index 270ebe72a..19da390b9 100644
--- a/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/models.go
+++ b/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/models.go
@@ -4,8 +4,6 @@
 
 package db
 
-import ()
-
 type Author struct {
 	ID int64
 }
diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/go/models.go
index 15518c958..179c247c5 100644
--- a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Demo struct {
 	Txt string
 }
diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/go/models.go
index 15518c958..179c247c5 100644
--- a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Demo struct {
 	Txt string
 }
diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/go/models.go
index 15518c958..179c247c5 100644
--- a/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Demo struct {
 	Txt string
 }
diff --git a/internal/endtoend/testdata/output_file_names/pgx/v4/go/models_gen.go b/internal/endtoend/testdata/output_file_names/pgx/v4/go/models_gen.go
index c8a3b2ab4..3b621df3c 100644
--- a/internal/endtoend/testdata/output_file_names/pgx/v4/go/models_gen.go
+++ b/internal/endtoend/testdata/output_file_names/pgx/v4/go/models_gen.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type User struct {
 	ID int64
 }
diff --git a/internal/endtoend/testdata/output_file_names/pgx/v5/go/models_gen.go b/internal/endtoend/testdata/output_file_names/pgx/v5/go/models_gen.go
index c8a3b2ab4..3b621df3c 100644
--- a/internal/endtoend/testdata/output_file_names/pgx/v5/go/models_gen.go
+++ b/internal/endtoend/testdata/output_file_names/pgx/v5/go/models_gen.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type User struct {
 	ID int64
 }
diff --git a/internal/endtoend/testdata/output_file_names/stdlib/go/models_gen.go b/internal/endtoend/testdata/output_file_names/stdlib/go/models_gen.go
index c8a3b2ab4..3b621df3c 100644
--- a/internal/endtoend/testdata/output_file_names/stdlib/go/models_gen.go
+++ b/internal/endtoend/testdata/output_file_names/stdlib/go/models_gen.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type User struct {
 	ID int64
 }
diff --git a/internal/endtoend/testdata/output_files_suffix/pgx/v4/go/models.go b/internal/endtoend/testdata/output_files_suffix/pgx/v4/go/models.go
index c8a3b2ab4..3b621df3c 100644
--- a/internal/endtoend/testdata/output_files_suffix/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/output_files_suffix/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type User struct {
 	ID int64
 }
diff --git a/internal/endtoend/testdata/output_files_suffix/pgx/v5/go/models.go b/internal/endtoend/testdata/output_files_suffix/pgx/v5/go/models.go
index c8a3b2ab4..3b621df3c 100644
--- a/internal/endtoend/testdata/output_files_suffix/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/output_files_suffix/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type User struct {
 	ID int64
 }
diff --git a/internal/endtoend/testdata/output_files_suffix/stdlib/go/models.go b/internal/endtoend/testdata/output_files_suffix/stdlib/go/models.go
index c8a3b2ab4..3b621df3c 100644
--- a/internal/endtoend/testdata/output_files_suffix/stdlib/go/models.go
+++ b/internal/endtoend/testdata/output_files_suffix/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type User struct {
 	ID int64
 }
diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/mysql/go/models.go b/internal/endtoend/testdata/overrides_go_struct_tags/mysql/go/models.go
index b5e6df3b8..d5eda0d6e 100644
--- a/internal/endtoend/testdata/overrides_go_struct_tags/mysql/go/models.go
+++ b/internal/endtoend/testdata/overrides_go_struct_tags/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package override
 
-import ()
-
 type Bar struct {
 	Other      string
 	AlsoTagged string `also:"tagged"`
diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/go/models.go b/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/go/models.go
index 8936763e2..c6933eaed 100644
--- a/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/go/models.go
+++ b/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package override
 
-import ()
-
 type Bar struct {
 	Other      string
 	AlsoTagged string `also:"tagged"`
diff --git a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/pg_timezone_names/go_pgx/v4/models.go b/internal/endtoend/testdata/pg_timezone_names/go_pgx/v4/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/pg_timezone_names/go_pgx/v4/models.go
+++ b/internal/endtoend/testdata/pg_timezone_names/go_pgx/v4/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/pg_timezone_names/go_pgx/v5/models.go b/internal/endtoend/testdata/pg_timezone_names/go_pgx/v5/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/pg_timezone_names/go_pgx/v5/models.go
+++ b/internal/endtoend/testdata/pg_timezone_names/go_pgx/v5/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/pg_timezone_names/go_stdlib/models.go b/internal/endtoend/testdata/pg_timezone_names/go_stdlib/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/pg_timezone_names/go_stdlib/models.go
+++ b/internal/endtoend/testdata/pg_timezone_names/go_stdlib/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/go/models.go
index c8a3b2ab4..3b621df3c 100644
--- a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type User struct {
 	ID int64
 }
diff --git a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/go/models.go
index c8a3b2ab4..3b621df3c 100644
--- a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type User struct {
 	ID int64
 }
diff --git a/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/go/models.go
index c8a3b2ab4..3b621df3c 100644
--- a/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type User struct {
 	ID int64
 }
diff --git a/internal/endtoend/testdata/quoted_colname/sqlite/go/models.go b/internal/endtoend/testdata/quoted_colname/sqlite/go/models.go
index c40af309f..10b2eac26 100644
--- a/internal/endtoend/testdata/quoted_colname/sqlite/go/models.go
+++ b/internal/endtoend/testdata/quoted_colname/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Test struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/go/models.go
index 4b02b66b1..bb51cd19a 100644
--- a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Myview struct {
 	int32
 }
diff --git a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/go/models.go
index 4b02b66b1..bb51cd19a 100644
--- a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Myview struct {
 	int32
 }
diff --git a/internal/endtoend/testdata/schema_scoped_create/mysql/go/models.go b/internal/endtoend/testdata/schema_scoped_create/mysql/go/models.go
index aa421669b..81a67dc52 100644
--- a/internal/endtoend/testdata/schema_scoped_create/mysql/go/models.go
+++ b/internal/endtoend/testdata/schema_scoped_create/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type FooBar struct {
 	ID   uint64
 	Name string
diff --git a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/go/models.go
index 7d9e5337d..e516c3f41 100644
--- a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type FooBar struct {
 	ID   int32
 	Name string
diff --git a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/go/models.go
index 7d9e5337d..e516c3f41 100644
--- a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type FooBar struct {
 	ID   int32
 	Name string
diff --git a/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/go/models.go
index 7d9e5337d..e516c3f41 100644
--- a/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type FooBar struct {
 	ID   int32
 	Name string
diff --git a/internal/endtoend/testdata/schema_scoped_delete/mysql/go/models.go b/internal/endtoend/testdata/schema_scoped_delete/mysql/go/models.go
index 369a65743..afd0e80bd 100644
--- a/internal/endtoend/testdata/schema_scoped_delete/mysql/go/models.go
+++ b/internal/endtoend/testdata/schema_scoped_delete/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type FooBar struct {
 	ID uint64
 }
diff --git a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/go/models.go
index 962865539..0587fbcdb 100644
--- a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type FooBar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/go/models.go
index 962865539..0587fbcdb 100644
--- a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type FooBar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/go/models.go
index 962865539..0587fbcdb 100644
--- a/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type FooBar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/schema_scoped_filter/mysql/go/models.go b/internal/endtoend/testdata/schema_scoped_filter/mysql/go/models.go
index 369a65743..afd0e80bd 100644
--- a/internal/endtoend/testdata/schema_scoped_filter/mysql/go/models.go
+++ b/internal/endtoend/testdata/schema_scoped_filter/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type FooBar struct {
 	ID uint64
 }
diff --git a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/go/models.go
index 962865539..0587fbcdb 100644
--- a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type FooBar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/go/models.go
index 962865539..0587fbcdb 100644
--- a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type FooBar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/go/models.go
index 962865539..0587fbcdb 100644
--- a/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type FooBar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/schema_scoped_list/mysql/go/models.go b/internal/endtoend/testdata/schema_scoped_list/mysql/go/models.go
index 369a65743..afd0e80bd 100644
--- a/internal/endtoend/testdata/schema_scoped_list/mysql/go/models.go
+++ b/internal/endtoend/testdata/schema_scoped_list/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type FooBar struct {
 	ID uint64
 }
diff --git a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/go/models.go
index 962865539..0587fbcdb 100644
--- a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type FooBar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/go/models.go
index 962865539..0587fbcdb 100644
--- a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type FooBar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/go/models.go
index 962865539..0587fbcdb 100644
--- a/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type FooBar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/schema_scoped_update/mysql/go/models.go b/internal/endtoend/testdata/schema_scoped_update/mysql/go/models.go
index aa421669b..81a67dc52 100644
--- a/internal/endtoend/testdata/schema_scoped_update/mysql/go/models.go
+++ b/internal/endtoend/testdata/schema_scoped_update/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type FooBar struct {
 	ID   uint64
 	Name string
diff --git a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/go/models.go
index 7d9e5337d..e516c3f41 100644
--- a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type FooBar struct {
 	ID   int32
 	Name string
diff --git a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/go/models.go
index 7d9e5337d..e516c3f41 100644
--- a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type FooBar struct {
 	ID   int32
 	Name string
diff --git a/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/go/models.go
index 7d9e5337d..e516c3f41 100644
--- a/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type FooBar struct {
 	ID   int32
 	Name string
diff --git a/internal/endtoend/testdata/select_column_cast/mysql/go/models.go b/internal/endtoend/testdata/select_column_cast/mysql/go/models.go
index b1608efcd..53229f5e5 100644
--- a/internal/endtoend/testdata/select_column_cast/mysql/go/models.go
+++ b/internal/endtoend/testdata/select_column_cast/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar bool
 }
diff --git a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/go/models.go
index b1608efcd..53229f5e5 100644
--- a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar bool
 }
diff --git a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/go/models.go
index b1608efcd..53229f5e5 100644
--- a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar bool
 }
diff --git a/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/go/models.go
index b1608efcd..53229f5e5 100644
--- a/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar bool
 }
diff --git a/internal/endtoend/testdata/select_column_cast/sqlite/go/models.go b/internal/endtoend/testdata/select_column_cast/sqlite/go/models.go
index 5688357fa..5fe55b748 100644
--- a/internal/endtoend/testdata/select_column_cast/sqlite/go/models.go
+++ b/internal/endtoend/testdata/select_column_cast/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Bar string
 }
diff --git a/internal/endtoend/testdata/select_cte/sqlite/go/models.go b/internal/endtoend/testdata/select_cte/sqlite/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/select_cte/sqlite/go/models.go
+++ b/internal/endtoend/testdata/select_cte/sqlite/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/select_exists/pgx/v4/go/models.go b/internal/endtoend/testdata/select_exists/pgx/v4/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/select_exists/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/select_exists/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/select_exists/pgx/v5/go/models.go b/internal/endtoend/testdata/select_exists/pgx/v5/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/select_exists/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/select_exists/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/select_exists/sqlite/go/models.go b/internal/endtoend/testdata/select_exists/sqlite/go/models.go
index 1c9863e88..2b98aa983 100644
--- a/internal/endtoend/testdata/select_exists/sqlite/go/models.go
+++ b/internal/endtoend/testdata/select_exists/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int64
 }
diff --git a/internal/endtoend/testdata/select_exists/stdlib/go/models.go b/internal/endtoend/testdata/select_exists/stdlib/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/select_exists/stdlib/go/models.go
+++ b/internal/endtoend/testdata/select_exists/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/select_not_exists/pgx/v4/go/models.go b/internal/endtoend/testdata/select_not_exists/pgx/v4/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/select_not_exists/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/select_not_exists/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/select_not_exists/pgx/v5/go/models.go b/internal/endtoend/testdata/select_not_exists/pgx/v5/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/select_not_exists/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/select_not_exists/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/select_not_exists/sqlite/go/models.go b/internal/endtoend/testdata/select_not_exists/sqlite/go/models.go
index 1c9863e88..2b98aa983 100644
--- a/internal/endtoend/testdata/select_not_exists/sqlite/go/models.go
+++ b/internal/endtoend/testdata/select_not_exists/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int64
 }
diff --git a/internal/endtoend/testdata/select_not_exists/stdlib/go/models.go b/internal/endtoend/testdata/select_not_exists/stdlib/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/select_not_exists/stdlib/go/models.go
+++ b/internal/endtoend/testdata/select_not_exists/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/models.go b/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/models.go
+++ b/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/select_text_array/pgx/v4/go/models.go b/internal/endtoend/testdata/select_text_array/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/select_text_array/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/select_text_array/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/select_text_array/pgx/v5/go/models.go b/internal/endtoend/testdata/select_text_array/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/select_text_array/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/select_text_array/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/select_text_array/stdlib/go/models.go b/internal/endtoend/testdata/select_text_array/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/select_text_array/stdlib/go/models.go
+++ b/internal/endtoend/testdata/select_text_array/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/selectstatic/mysql/go/models.go b/internal/endtoend/testdata/selectstatic/mysql/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/selectstatic/mysql/go/models.go
+++ b/internal/endtoend/testdata/selectstatic/mysql/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/show_warnings/mysql/go/models.go b/internal/endtoend/testdata/show_warnings/mysql/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/show_warnings/mysql/go/models.go
+++ b/internal/endtoend/testdata/show_warnings/mysql/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/go/models.go
index b2bf6335b..f9ff2d308 100644
--- a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/go/models.go
@@ -3,5 +3,3 @@
 //   sqlc v1.25.0
 
 package querytest
-
-import ()
diff --git a/internal/endtoend/testdata/sqlc_arg/mysql/go/models.go b/internal/endtoend/testdata/sqlc_arg/mysql/go/models.go
index 77ff19852..dad0ae50a 100644
--- a/internal/endtoend/testdata/sqlc_arg/mysql/go/models.go
+++ b/internal/endtoend/testdata/sqlc_arg/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Name string
 }
diff --git a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/go/models.go
index 77ff19852..dad0ae50a 100644
--- a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Name string
 }
diff --git a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/go/models.go
index 77ff19852..dad0ae50a 100644
--- a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Name string
 }
diff --git a/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/go/models.go
index 77ff19852..dad0ae50a 100644
--- a/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Name string
 }
diff --git a/internal/endtoend/testdata/sqlc_arg/sqlite/go/models.go b/internal/endtoend/testdata/sqlc_arg/sqlite/go/models.go
index 77ff19852..dad0ae50a 100644
--- a/internal/endtoend/testdata/sqlc_arg/sqlite/go/models.go
+++ b/internal/endtoend/testdata/sqlc_arg/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Name string
 }
diff --git a/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/go/models.go b/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/go/models.go
index 011139f22..01081a4b5 100644
--- a/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/go/models.go
+++ b/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	ID   int32
 	Name string
diff --git a/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/go/models.go
index 011139f22..01081a4b5 100644
--- a/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	ID   int32
 	Name string
diff --git a/internal/endtoend/testdata/sqlite_skip_todo/db/db.go b/internal/endtoend/testdata/sqlite_skip_todo/db/db.go
new file mode 100644
index 000000000..bdb151c18
--- /dev/null
+++ b/internal/endtoend/testdata/sqlite_skip_todo/db/db.go
@@ -0,0 +1,31 @@
+// Code generated by sqlc. DO NOT EDIT.
+// versions:
+//   sqlc v1.25.0
+
+package db
+
+import (
+	"context"
+	"database/sql"
+)
+
+type DBTX interface {
+	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
+	PrepareContext(context.Context, string) (*sql.Stmt, error)
+	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
+	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
+}
+
+func New(db DBTX) *Queries {
+	return &Queries{db: db}
+}
+
+type Queries struct {
+	db DBTX
+}
+
+func (q *Queries) WithTx(tx *sql.Tx) *Queries {
+	return &Queries{
+		db: tx,
+	}
+}
diff --git a/internal/endtoend/testdata/sqlite_skip_todo/db/models.go b/internal/endtoend/testdata/sqlite_skip_todo/db/models.go
new file mode 100644
index 000000000..a1065e0b7
--- /dev/null
+++ b/internal/endtoend/testdata/sqlite_skip_todo/db/models.go
@@ -0,0 +1,13 @@
+// Code generated by sqlc. DO NOT EDIT.
+// versions:
+//   sqlc v1.25.0
+
+package db
+
+import (
+	"database/sql"
+)
+
+type Foo struct {
+	Bar sql.NullString
+}
diff --git a/internal/endtoend/testdata/sqlite_skip_todo/db/query.sql.go b/internal/endtoend/testdata/sqlite_skip_todo/db/query.sql.go
new file mode 100644
index 000000000..de3260566
--- /dev/null
+++ b/internal/endtoend/testdata/sqlite_skip_todo/db/query.sql.go
@@ -0,0 +1,66 @@
+// Code generated by sqlc. DO NOT EDIT.
+// versions:
+//   sqlc v1.25.0
+// source: query.sql
+
+package db
+
+import (
+	"context"
+	"database/sql"
+)
+
+const getFoo = `-- name: GetFoo :many
+SELECT bar FROM foo
+WHERE bar = ?
+`
+
+func (q *Queries) GetFoo(ctx context.Context, bar sql.NullString) ([]sql.NullString, error) {
+	rows, err := q.db.QueryContext(ctx, getFoo, bar)
+	if err != nil {
+		return nil, err
+	}
+	defer rows.Close()
+	var items []sql.NullString
+	for rows.Next() {
+		var bar sql.NullString
+		if err := rows.Scan(&bar); err != nil {
+			return nil, err
+		}
+		items = append(items, bar)
+	}
+	if err := rows.Close(); err != nil {
+		return nil, err
+	}
+	if err := rows.Err(); err != nil {
+		return nil, err
+	}
+	return items, nil
+}
+
+const listFoo = `-- name: ListFoo :many
+SELECT bar FROM foo
+`
+
+func (q *Queries) ListFoo(ctx context.Context) ([]sql.NullString, error) {
+	rows, err := q.db.QueryContext(ctx, listFoo)
+	if err != nil {
+		return nil, err
+	}
+	defer rows.Close()
+	var items []sql.NullString
+	for rows.Next() {
+		var bar sql.NullString
+		if err := rows.Scan(&bar); err != nil {
+			return nil, err
+		}
+		items = append(items, bar)
+	}
+	if err := rows.Close(); err != nil {
+		return nil, err
+	}
+	if err := rows.Err(); err != nil {
+		return nil, err
+	}
+	return items, nil
+}
diff --git a/internal/endtoend/testdata/sqlite_skip_todo/query.sql b/internal/endtoend/testdata/sqlite_skip_todo/query.sql
new file mode 100644
index 000000000..e51c45c8c
--- /dev/null
+++ b/internal/endtoend/testdata/sqlite_skip_todo/query.sql
@@ -0,0 +1,16 @@
+-- name: PragmaForeignKeysEnable :exec
+PRAGMA foreign_keys = 1;
+
+-- name: ListFoo :many
+SELECT * FROM foo;
+
+-- name: PragmaForeignKeysDisable :exec
+PRAGMA foreign_keys = 0;
+
+-- name: PragmaForeignKeysGet :one
+PRAGMA foreign_keys;
+
+-- name: GetFoo :many
+SELECT * FROM foo
+WHERE bar = ?;
+
diff --git a/internal/endtoend/testdata/sqlite_skip_todo/schema.sql b/internal/endtoend/testdata/sqlite_skip_todo/schema.sql
new file mode 100644
index 000000000..010d09e16
--- /dev/null
+++ b/internal/endtoend/testdata/sqlite_skip_todo/schema.sql
@@ -0,0 +1,3 @@
+CREATE TABLE foo (
+    bar text
+);
diff --git a/internal/endtoend/testdata/sqlite_skip_todo/sqlc.json b/internal/endtoend/testdata/sqlite_skip_todo/sqlc.json
new file mode 100644
index 000000000..cbd787d93
--- /dev/null
+++ b/internal/endtoend/testdata/sqlite_skip_todo/sqlc.json
@@ -0,0 +1,16 @@
+{
+    "version": "2",
+    "sql": [
+        {
+            "engine": "sqlite",
+            "queries": "query.sql",
+            "schema": "schema.sql",
+            "gen": {
+                "go": {
+                    "package": "db",
+                    "out": "db"
+                }
+            }
+        }
+    ]
+}
diff --git a/internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/models.go
index 74b060c8f..8daf941c1 100644
--- a/internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Transaction struct {
 	ID        int64
 	Uri       string
diff --git a/internal/endtoend/testdata/table_function/sqlite/go/models.go b/internal/endtoend/testdata/table_function/sqlite/go/models.go
index 81cf33e2f..51d567a2c 100644
--- a/internal/endtoend/testdata/table_function/sqlite/go/models.go
+++ b/internal/endtoend/testdata/table_function/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Transaction struct {
 	Uri       string
 	ProgramID string
diff --git a/internal/endtoend/testdata/truncate/mysql/go/models.go b/internal/endtoend/testdata/truncate/mysql/go/models.go
index 640094aa5..3fe613c68 100644
--- a/internal/endtoend/testdata/truncate/mysql/go/models.go
+++ b/internal/endtoend/testdata/truncate/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID uint64
 }
diff --git a/internal/endtoend/testdata/truncate/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/truncate/postgresql/pgx/v4/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/truncate/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/truncate/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/truncate/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/truncate/postgresql/pgx/v5/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/truncate/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/truncate/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/truncate/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/truncate/postgresql/stdlib/go/models.go
index 122ffd4a7..426e1c096 100644
--- a/internal/endtoend/testdata/truncate/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/truncate/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Bar struct {
 	ID int32
 }
diff --git a/internal/endtoend/testdata/unknown_func/pgx/v4/go/models.go b/internal/endtoend/testdata/unknown_func/pgx/v4/go/models.go
index 42851da25..c60367c57 100644
--- a/internal/endtoend/testdata/unknown_func/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/unknown_func/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/unknown_func/pgx/v5/go/models.go b/internal/endtoend/testdata/unknown_func/pgx/v5/go/models.go
index 42851da25..c60367c57 100644
--- a/internal/endtoend/testdata/unknown_func/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/unknown_func/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/unknown_func/stdlib/go/models.go b/internal/endtoend/testdata/unknown_func/stdlib/go/models.go
index 42851da25..c60367c57 100644
--- a/internal/endtoend/testdata/unknown_func/stdlib/go/models.go
+++ b/internal/endtoend/testdata/unknown_func/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	ID string
 }
diff --git a/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/models.go b/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/models.go
index 3179edd09..c2e7b60e5 100644
--- a/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/models.go
+++ b/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Item struct {
 	ItemID int64
 }
diff --git a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/go/models.go
index 472c7c7cf..60287350f 100644
--- a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type ArrayValue struct {
 	ID     int64
 	Values []string
diff --git a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/go/models.go
index 472c7c7cf..60287350f 100644
--- a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type ArrayValue struct {
 	ID     int64
 	Values []string
diff --git a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/go/models.go
index 472c7c7cf..60287350f 100644
--- a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type ArrayValue struct {
 	ID     int64
 	Values []string
diff --git a/internal/endtoend/testdata/unsigned_params/mysql/go/models.go b/internal/endtoend/testdata/unsigned_params/mysql/go/models.go
index de8bf66e8..7db4c886e 100644
--- a/internal/endtoend/testdata/unsigned_params/mysql/go/models.go
+++ b/internal/endtoend/testdata/unsigned_params/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	ID uint32
 }
diff --git a/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/db/models.go b/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/db/models.go
index 474de825d..d16a008c9 100644
--- a/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/db/models.go
+++ b/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/db/models.go
@@ -4,8 +4,6 @@
 
 package db
 
-import ()
-
 type Repro struct {
 	ID   interface{}
 	Name interface{}
diff --git a/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/models.go b/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/models.go
index 377f8007b..ff7b81fb9 100644
--- a/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/models.go
+++ b/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Author struct {
 	ID    int64
 	Names []string
diff --git a/internal/endtoend/testdata/update_join/mysql/db/models.go b/internal/endtoend/testdata/update_join/mysql/db/models.go
index f7dbfd4f2..8e95397a4 100644
--- a/internal/endtoend/testdata/update_join/mysql/db/models.go
+++ b/internal/endtoend/testdata/update_join/mysql/db/models.go
@@ -4,8 +4,6 @@
 
 package db
 
-import ()
-
 type JoinTable struct {
 	ID             uint64
 	PrimaryTableID uint64
diff --git a/internal/endtoend/testdata/update_join/postgresql/db/models.go b/internal/endtoend/testdata/update_join/postgresql/db/models.go
index 48fc6ddfd..0f8340e5e 100644
--- a/internal/endtoend/testdata/update_join/postgresql/db/models.go
+++ b/internal/endtoend/testdata/update_join/postgresql/db/models.go
@@ -4,8 +4,6 @@
 
 package db
 
-import ()
-
 type JoinTable struct {
 	ID             int32
 	PrimaryTableID int32
diff --git a/internal/endtoend/testdata/update_set/myql/go/models.go b/internal/endtoend/testdata/update_set/myql/go/models.go
index 8e8db0a02..571642ed4 100644
--- a/internal/endtoend/testdata/update_set/myql/go/models.go
+++ b/internal/endtoend/testdata/update_set/myql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Name string
 	Slug string
diff --git a/internal/endtoend/testdata/update_set/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/update_set/postgresql/pgx/v4/go/models.go
index 8e8db0a02..571642ed4 100644
--- a/internal/endtoend/testdata/update_set/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/update_set/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Name string
 	Slug string
diff --git a/internal/endtoend/testdata/update_set/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/update_set/postgresql/pgx/v5/go/models.go
index 8e8db0a02..571642ed4 100644
--- a/internal/endtoend/testdata/update_set/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/update_set/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Name string
 	Slug string
diff --git a/internal/endtoend/testdata/update_set/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/update_set/postgresql/stdlib/go/models.go
index 8e8db0a02..571642ed4 100644
--- a/internal/endtoend/testdata/update_set/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/update_set/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Name string
 	Slug string
diff --git a/internal/endtoend/testdata/update_set/sqlite/go/models.go b/internal/endtoend/testdata/update_set/sqlite/go/models.go
index 8e8db0a02..571642ed4 100644
--- a/internal/endtoend/testdata/update_set/sqlite/go/models.go
+++ b/internal/endtoend/testdata/update_set/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Name string
 	Slug string
diff --git a/internal/endtoend/testdata/update_set_multiple/mysql/go/models.go b/internal/endtoend/testdata/update_set_multiple/mysql/go/models.go
index 8e8db0a02..571642ed4 100644
--- a/internal/endtoend/testdata/update_set_multiple/mysql/go/models.go
+++ b/internal/endtoend/testdata/update_set_multiple/mysql/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Name string
 	Slug string
diff --git a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/go/models.go
index 8e8db0a02..571642ed4 100644
--- a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/go/models.go
+++ b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Name string
 	Slug string
diff --git a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/go/models.go
index 8e8db0a02..571642ed4 100644
--- a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/go/models.go
+++ b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Name string
 	Slug string
diff --git a/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/go/models.go
index 8e8db0a02..571642ed4 100644
--- a/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/go/models.go
+++ b/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Name string
 	Slug string
diff --git a/internal/endtoend/testdata/update_set_multiple/sqlite/go/models.go b/internal/endtoend/testdata/update_set_multiple/sqlite/go/models.go
index 8e8db0a02..571642ed4 100644
--- a/internal/endtoend/testdata/update_set_multiple/sqlite/go/models.go
+++ b/internal/endtoend/testdata/update_set_multiple/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Foo struct {
 	Name string
 	Slug string
diff --git a/internal/endtoend/testdata/upsert/sqlite/go/models.go b/internal/endtoend/testdata/upsert/sqlite/go/models.go
index 187f7d4e2..56749cbaa 100644
--- a/internal/endtoend/testdata/upsert/sqlite/go/models.go
+++ b/internal/endtoend/testdata/upsert/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Location struct {
 	ID        int64
 	Name      string
diff --git a/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/query.sql b/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/query.sql
new file mode 100644
index 000000000..75e38b2ca
--- /dev/null
+++ b/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/query.sql
@@ -0,0 +1,19 @@
+-- name: GetAuthor :one
+SELECT * FROM authors
+WHERE id = $1 LIMIT 1;
+
+-- name: ListAuthors :many
+SELECT * FROM authors
+ORDER BY name;
+
+-- name: CreateAuthor :one
+INSERT INTO authors (
+          name, bio
+) VALUES (
+  $1, $2
+)
+RETURNING *;
+
+-- name: DeleteAuthor :exec
+DELETE FROM authors
+WHERE id = $1;
diff --git a/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/schema.sql b/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/schema.sql
new file mode 100644
index 000000000..b4fad7849
--- /dev/null
+++ b/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/schema.sql
@@ -0,0 +1,5 @@
+CREATE TABLE authors (
+          id   BIGSERIAL PRIMARY KEY,
+          name text      NOT NULL,
+          bio  text
+);
diff --git a/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/sqlc.json b/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/sqlc.json
new file mode 100644
index 000000000..bb84bddeb
--- /dev/null
+++ b/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/sqlc.json
@@ -0,0 +1,25 @@
+{
+  "version": "2",
+  "sql": [
+    {
+      "schema": "schema.sql",
+      "queries": "query.sql",
+      "engine": "postgresql",
+      "codegen": [
+        {
+          "out": "gen",
+          "plugin": "test"
+        }
+      ]
+    }
+  ],
+  "plugins": [
+    {
+      "name": "test",
+      "wasm": {
+        "url": "https://github.com/sqlc-dev/sqlc-gen-unsafe-paths/releases/download/v0.1.1/sqlc-gen-unsafe-paths.wasm",
+        "sha256": "e53ac951dd41b1e4c365e757d9735886f7c8e92f2056ce0be9a5cfcf677c45d9"
+      }
+    }
+  ]
+}
diff --git a/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/stderr.txt b/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/stderr.txt
new file mode 100644
index 000000000..8d664b061
--- /dev/null
+++ b/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/stderr.txt
@@ -0,0 +1,2 @@
+# package test
+error generating code: invalid file output path: /tmp/unsafe.txt
diff --git a/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/stderr_windows.txt b/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/stderr_windows.txt
new file mode 100644
index 000000000..33d32af53
--- /dev/null
+++ b/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/stderr_windows.txt
@@ -0,0 +1,2 @@
+# package test
+error generating code: invalid file output path: D:/tmp/unsafe.txt
diff --git a/internal/endtoend/testdata/where_collate/sqlite/go/models.go b/internal/endtoend/testdata/where_collate/sqlite/go/models.go
index 4e5d40942..95f1883c7 100644
--- a/internal/endtoend/testdata/where_collate/sqlite/go/models.go
+++ b/internal/endtoend/testdata/where_collate/sqlite/go/models.go
@@ -4,8 +4,6 @@
 
 package querytest
 
-import ()
-
 type Account struct {
 	ID   string
 	Name string