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 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"));
Version
1.27.0
What happened?
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
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/043ded77492cec27dbba4e964774d08836ad76227a585856ae284f13f9046f24
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: