You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a query checks if a sqlc.narg is null OR in a sqlc.slice it causes "github.com/lib/pq" to be imported.
Simply id IN (sqlc.slice('author_ids') does not.
Relevant log output
No response
Database schema
CREATETABLEauthors (
id BIGINTNOT NULL AUTO_INCREMENT PRIMARY KEY,
name textNOT NULL,
bio text
);
SQL queries
-- name: CausesPgToBeImported :manySELECT
id AS author_id,
name AS author_name,
bio AS author_bio
FROM
authors
WHERE
(sqlc.narg('author_ids') IS NULLOR id IN (sqlc.slice('author_ids')));
Version
1.27.0
What happened?
When a query checks if a
sqlc.narg
is null OR in asqlc.slice
it causes"github.com/lib/pq"
to be imported.Simply
id IN (sqlc.slice('author_ids')
does not.Relevant log output
No response
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/0393067265d4e28076917f8b00b10e81d231a95ca79cdf222cf8ed61de62bffa
What operating system are you using?
macOS
What database engines are you using?
MySQL
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: