- changed milestone to blue sky
support mysql DELETE FROM ... JOIN / Postgresql DELETE..USING ?
Issue #959
new
delete(table-or-join) should be acceptable with the mysql dialect and produce the expected DELETE FROM basetable JOIN etc
. currently:
>>> metadata.bind = 'mysql:///test'
>>> print delete(parents_table)
DELETE FROM parents
>>> print delete(parents_table.join(children_table))
Traceback (most recent call last):
...
AttributeError: 'Join' object has no attribute 'name'
>>> print delete(parents_table.join(children_table).alias('x'))
DELETE FROM x
Comments (5)
-
repo owner -
repo owner PG supports the same thing via USING: http://www.postgresql.org/docs/8.3/interactive/sql-delete.html . Though I doubt its widely used in the PG community.
-
repo owner mysql has the USING keyword as well: http://dev.mysql.com/doc/refman/5.0/en/delete.html perhaps these can be done the same way
-
repo owner - changed title to support mysql DELETE FROM ... JOIN / Postgresql DELETE..USING ?
- changed component to sql
- edited description
- removed responsible
-
repo owner mysql seems to support it as simple "DELETE USING" as well http://dev.mysql.com/doc/refman/5.7/en/delete.html. if both syntaxes are identical here that would help a lot.
- Log in to comment