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
If you have a query with two JOINs which have parameters sqlite engine skips parameter in one of the JOINs.
If you change sqlite to mysql generation works correctly.
Schema, query and playground link are provided.
Relevant log output
No response
Database schema
CREATETABLEauthors (
id integerPRIMARY KEY,
name textNOT NULL,
age integer
);
CREATETABLEtranslators (
id integerPRIMARY KEY,
name textNOT NULL,
age integer
);
CREATETABLEbooks (
id integerPRIMARY KEY,
author textNOT NULL,
translator textNOT NULL,
year integer
);
SQL queries
DELETEFROM
books AS b
WHEREb.author NOT IN (
SELECTa.nameFROM
authors a
WHEREa.age>= ?
)
ANDb.translator NOT IN (
SELECTt.nameFROM
translators t
WHEREt.age>= ?
)
ANDb.year<= ?;
Version
1.18.0
What happened?
If you have a query with two JOINs which have parameters
sqlite
engine skips parameter in one of the JOINs.If you change
sqlite
tomysql
generation works correctly.Schema, query and playground link are provided.
Relevant log output
No response
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/b46d0f5491464a5698aeb56d290764f8a38daa6f59d2a5f89f3ab707a9b2b078
What operating system are you using?
Windows
What database engines are you using?
SQLite
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: