Closed
Description
Version
1.14.0
What happened?
batch.go will import "github.com/jackc/pgconn" without using it if you use :execresult
and :batchexec
in the same query.sql file
Relevant log output
No response
Database schema
-- Example queries for sqlc
CREATE TABLE authors (
id BIGSERIAL PRIMARY KEY,
name text NOT NULL,
bio text
);
SQL queries
-- name: CreateAuthor :execresult
INSERT INTO authors (
name, bio
) VALUES (
$1, $2
);
-- name: BatchUpdateBio :batchexec
UPDATE authors
SET bio = $1
WHERE id = $2;
Configuration
{
"version": "1",
"packages": [
{
"path": "db",
"engine": "postgresql",
"schema": "query.sql",
"queries": "query.sql",
"sql_package": "pgx/v4",
}
]
}
Playground URL
https://play.sqlc.dev/p/3669b609952d7561251d8991ad37a043ce0fdcb44c1dd9f8c927bc607aaec059
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go