we are very slowly getting around to supporting various edge case syntaxes like 
these, this one is:

https://bitbucket.org/zzzeek/sqlalchemy/issue/959/support-mysql-delete-from-join
 
<https://bitbucket.org/zzzeek/sqlalchemy/issue/959/support-mysql-delete-from-join>

it’s not very often requested so it’s pretty low in the priority at the moment.

so for now the only options are to stick with the string SQL or try to build 
your own construct using the @compiles system:

http://docs.sqlalchemy.org/en/rel_0_9/core/compiler.html 
<http://docs.sqlalchemy.org/en/rel_0_9/core/compiler.html>




> On Nov 14, 2014, at 12:48 AM, 'Dmitry Pugachevich' via sqlalchemy 
> <sqlalchemy@googlegroups.com> wrote:
> 
> hey guys,
> 
> can’t figure out how to properly construct sqla core delete() construct for 
> something that should look like (I’m using MySQL):
> 
> DELETE FROM a USING a
> JOIN b ON (a.id1 = b.id1)
> JOIN c ON (a.id2 = c.id2)
> WHERE . . .
> 
> I can write in it literal SQL and feed to the execute() of course but I was 
> wondering if it’s possible to write it via table.delete() construct somehow.
> 
> —
> Thanks,
> Dima.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sqlalchemy+unsubscr...@googlegroups.com 
> <mailto:sqlalchemy+unsubscr...@googlegroups.com>.
> To post to this group, send email to sqlalchemy@googlegroups.com 
> <mailto:sqlalchemy@googlegroups.com>.
> Visit this group at http://groups.google.com/group/sqlalchemy 
> <http://groups.google.com/group/sqlalchemy>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to