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
\ WHERE (T0.int_a0 = (SELECT ALL T1.int_b0 AS f0 \
\ FROM TEST.set_b T1 \
\ WHERE (T1.int_b0 = 0)))"
Like the raw SQL command written in test of relational-query, currently, HRR will generate delete command with alias which is invalid syntax for MySQL.
Ex.
DELETE FROM table T0 WHERE T0.field = 'value';
There might be two solutions to fix this:
Don't use alias for DELETE
DELETE FROM table WHERE field = 'value';
Declare alias after DELETE would be valid syntax
(Edited: it's very sad this one will be invalid syntax for PostgreSQL 😢 )
DELETE T0 FROM table AS T0 WHERE T0.field = 'value';
As the second one is invalid for PostgreSQL, maybe we will need to fix this by the first solution 🤔 ?
First of all, thanks for building this awesome library for generating type safe SQL queries.
While using this lib to build some queries, I found this issue for DELETE command.
haskell-relational-record/relational-query/test/sqlsEq.hs
Lines 773 to 777 in 070fc1e
Like the raw SQL command written in test of
relational-query
, currently, HRR will generate delete command with alias which is invalid syntax for MySQL.Ex.
There might be two solutions to fix this:
alias
afterDELETE
would be valid syntax(Edited: it's very sad this one will be invalid syntax for PostgreSQL 😢 )
As the second one is invalid for PostgreSQL, maybe we will need to fix this by the first solution 🤔 ?
@khibino WDYT? Thank you!
The text was updated successfully, but these errors were encountered: