sqlgg icon indicating copy to clipboard operation
sqlgg copied to clipboard

Support for IN clause with tuple sets in generated SQL queries

Open sewenthy opened this issue 1 year ago • 0 comments

Description

The following query works in MariaDB:

SELECT col3 FROM table1
WHERE (col1, col2) IN (('x', 1), ('y', 2));

I want to generate a similar query using sqlgg:

SELECT col3 FROM table1
WHERE (col1, col2) IN @col1_col2_set;

When trying to generate this query using sqlgg, I encounter the following error:

Tokens: , col2) IN @col1_col2_set
Error: Sqlgg.Sql_parser.MenhirBasics.Error

Expected Behavior

sqlgg should generate the function that accept a list of tuples with correct types of col1 and col2.

sewenthy avatar Jun 04 '24 03:06 sewenthy