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
sqlc.slice() fails with 'column does not exist' error when used with subquery-computed column #3720
When using sqlc.slice() with a column computed in a subquery, sqlc generate fails with a "column does not exist" error. This occurs even though the column is correctly defined and aliased in the subquery.
Relevant log output
query.sql:18:3: 396: column "full_name" does not exist
Database schema
CREATETABLEcustomers (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
first_name varchar(255) not null,
last_name varchar(255) not null
) ENGINE = INNODB DEFAULT CHARSET = utf8mb4;
SQL queries
-- name: GetFullNames :manySELECT
full_name
FROM
(
SELECT
concat(first_name, '', last_name) as full_name
FROM
customers
) subquery
WHERE
full_name IN (sqlc.slice ("full_names"));
Activity
swallowstalker commentedon Dec 23, 2024
I think this is duplicate of #2989, #2400
and it is being solved by #3322 but it does not continue somehow