Re: [sqlalchemy] Executing callback after current transaction commit unless rollback occurs

2016-03-28 Thread Yegor Roganov
Thanks Mike Unfortunately it seems that after_transaction_end event executes twice: right before COMMIT and after after_commit event. Here what I see with echo=True and some prints: 2016-03-29 07:29:14,799 INFO sqlalchemy.engine.base.Engine INSERT INTO users (id) VALUES (?) 2016-03-29

Re: [sqlalchemy] Executing callback after current transaction commit unless rollback occurs

2016-03-28 Thread Jonathan Vanasco
You could also implement a Two Phase Commit using `zope.sqlalchemy` and the `transaction` package. -- 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

Re: [sqlalchemy] Executing callback after current transaction commit unless rollback occurs

2016-03-28 Thread Mike Bayer
On 03/28/2016 03:21 PM, Yegor Roganov wrote: I would like to get what I described in the subject: attach an event listener that will execute once after current transaction's successful commit (analogue to django's on_commit

[sqlalchemy] Executing callback after current transaction commit unless rollback occurs

2016-03-28 Thread Yegor Roganov
I would like to get what I described in the subject: attach an event listener that will execute once after current transaction's successful commit (analogue to django's on_commit ). If current

Re: [sqlalchemy] Modeling single FK to multiple tables

2016-03-28 Thread Mike Bayer
you get a nicer result set (string indexes) and you don't have to mess with connection.cursor() and other inconveniences. On 03/28/2016 08:58 AM, Alex Hall wrote: That would certainly work. :) Would that offer any benefits over pyodbc, since I wouldn't have the mapping (which was taking all

Re: [sqlalchemy] Modeling single FK to multiple tables

2016-03-28 Thread Alex Hall
That would certainly work. :) Would that offer any benefits over pyodbc, since I wouldn't have the mapping (which was taking all the time I was spending with SA)? On 3/25/16, Mike Bayer wrote: > > > On 03/25/2016 05:20 PM, Alex Hall wrote: >> Hi all, >> Since SA was