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
I have a problem with generating a tuple-based expressions in my queryDsl generated SQL statements. All works fine if the expression in IN-clause is an array with more than one element (more than one expression) - the result looks like 'in ((?, ?), ... (?, ?))'. But if this array contains only one expression, IN-clause is just 'in (?, ?)' and this is a wrong SQL relation operator format.
This test fails on the 'Array contains 1 item' case (two other cases are successful):
Expected :(?, ?) in ((?, ?))
Actual :(?, ?) in (?, ?)
but select * from someTable where (a, b) in (1, 2) is definitely a bad grammar SQL statement.
Looks like I have done something wrong - I was not able to make one-element array of expressions for IN-clause to be rendered properly - to the in ((?, ?)) pattern. Is it possible somehow to make queryDsl render a single-element array of expressions in the properly nested '((?, ?))' patterm?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a problem with generating a tuple-based expressions in my queryDsl generated SQL statements. All works fine if the expression in IN-clause is an array with more than one element (more than one expression) - the result looks like 'in ((?, ?), ... (?, ?))'. But if this array contains only one expression, IN-clause is just 'in (?, ?)' and this is a wrong SQL relation operator format.
This is a small test which showcases my problem:
This test fails on the 'Array contains 1 item' case (two other cases are successful):
but
select * from someTable where (a, b) in (1, 2)
is definitely a bad grammar SQL statement.Looks like I have done something wrong - I was not able to make one-element array of expressions for IN-clause to be rendered properly - to the
in ((?, ?))
pattern. Is it possible somehow to make queryDsl render a single-element array of expressions in the properly nested '((?, ?))' patterm?Beta Was this translation helpful? Give feedback.
All reactions