Version
1.10.0
What happened?
I generated methods for a table with a text array. I expected it not to add a dependency on lib/pq since #472 is fixed.
Discussion: Ideally I would have liked this to automatically detect the array type and use https://pkg.go.dev/github.com/jackc/pgtype#TextArray, but I expect that sort of thing might be hard to do for all the different array types supported by Postgres. I don't know if there is some halfway implementation we can do.
Relevant log output
No response
Database schema
-- Example queries for sqlc
CREATE TABLE authors (
id BIGSERIAL PRIMARY KEY,
names text[] NOT NULL
);
SQL queries
-- name: GetAuthor :one
SELECT * FROM authors
WHERE id = $1 LIMIT 1;
Configuration
{
"version": "1",
"packages": [
{
"path": "db",
"engine": "postgresql",
"schema": "query.sql",
"queries": "query.sql"
}
]
}
Playground URL
https://play.sqlc.dev/p/224d4391b08fb5d3d3651f006792dc02426547c851d4138ecac512db2fdf419c
What operating system are you using?
Linux, macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
Version
1.10.0
What happened?
I generated methods for a table with a text array. I expected it not to add a dependency on
lib/pqsince #472 is fixed.Discussion: Ideally I would have liked this to automatically detect the array type and use https://pkg.go.dev/github.com/jackc/pgtype#TextArray, but I expect that sort of thing might be hard to do for all the different array types supported by Postgres. I don't know if there is some halfway implementation we can do.
Relevant log output
No response
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/224d4391b08fb5d3d3651f006792dc02426547c851d4138ecac512db2fdf419c
What operating system are you using?
Linux, macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go