kysely
kysely copied to clipboard
Support DELETE [TABLE] FROM [TABLE]
When using delete with leftJoin, you need to use a syntax similar to DELETE [TABLE] FROM [TABLE], but I not found any implementation methods other than raw in the document
Discussion on stackoverflow: Deleting rows with MySQL LEFT JOIN
The following syntax is equivalent to the one you've mentioned:
DELETE FROM t1, t2 USING t1 INNER JOIN t2 INNER JOIN t3 WHERE t1.id=t2.id AND t2.id=t3.id; https://dev.mysql.com/doc/refman/8.0/en/delete.html
It will be easier to implement and with less awkwardness and breaking changes.
using is also supported in other databases, and was requested in #177. 2x🐦1x🗿