sqlc
sqlc copied to clipboard
Redundant import of lib/pq when using sqlc.slice() with sqlc.narg() with MySQL
Version
1.26.0
What happened?
When I run sqlc generate
with engine: "mysql
and I use sqlc.slice(myslice)
inside queries, in the generated file with Go code it inserts an import of "github.com/lib/pq"
but it is not used in any code so my app does not compile after that.
It happens only when I use it in combination with sqlc.narg(myslice)
because I want to ensure that if the argument is null I do not need to filter by it.
The problem is reproducible in the online playground, please look at the link I've attached. Thanks!
Relevant log output
No response
Database schema
No response
SQL queries
No response
Configuration
No response
Playground URL
https://play.sqlc.dev/p/96994ab9c5be500a74b65ba1e9e870a7dce1fccfae8bc2956909cba197698c5f
What operating system are you using?
macOS
What database engines are you using?
MySQL
What type of code are you generating?
Go