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
CREATETABLE `conflicts` (
`id`int(10) unsigned NOT NULL AUTO_INCREMENT,
`currency_id`int(10) unsigned NOT NULL,
`blockchain_id`int(10) unsigned NOT NULL,
`reference`varchar(255) NOT NULL,
PRIMARY KEY (`id`)
);
SQL queries
-- name: DeleteConflicts :execrowsDELETE conflicts
FROM conflicts
JOIN (
SELECT blockchain_id, reference
FROM conflicts
GROUP BY blockchain_id, reference
HAVINGCOUNT(DISTINCT currency_id) =1
) AS resolved_conflicts
ONconflicts.blockchain_id=resolved_conflicts.blockchain_idANDconflicts.reference=resolved_conflicts.reference;
Version
1.28.0
What happened?
When generating a query with a delete statement that uses a join, sqlc returns this error:
panic: expected range var
The code itself works in my database if I run it native. I've made a simplified version of my database and query to show the issue.
Relevant log output
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/8b36238bfbc667bc2478394d370938fdaad11bd2c82df63a5e59f17b699b24f0
What operating system are you using?
Linux
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: