1. Michael Bayer
  2. sqlalchemy

Issues

Issue #959 new

support mysql DELETE FROM ... JOIN

jason kirtland
created an issue

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 (3)

  1. Log in to comment