sql-psi
sql-psi copied to clipboard
WHERE IN many columns
Dialect: ALL
failing sql:
CREATE TABLE Test(field1 INTEGER NOT NULL, field2 INTEGER NOT NULL);
select1:
SELECT * FROM Test
WHERE (field1, field2) IN (VALUES(1,2));
select2:
SELECT * FROM Test
WHERE (field1, field2) IN ?;
',' after field1 is marked as error:
(', ')', '.', <binary like operator real>, BETWEEN or IN expected, got ','
Also In second case I expect type safe class to be generated to I can use it something like this:
select2(
listOf(
Select2Values(field1 = 1, field2 = 2),
Select2Values(field1 = 2, field2 = 1),
)
)
I think, the first case is implemented in #411. Now sqldelight needs use this to implement select2, so what about closing this issue here and create another one in sqldelight?
Closed in favor of https://github.com/cashapp/sqldelight/issues/4205