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
{{ message }}
Repository navigation
[MySQL] Query: Named arg is null or in slice caused Postgres import #3783
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')));
Activity