PaulE wrote: > All, > > I want to do a two-phase commit. > Published examples are more complex than what I need. > To put it another way, I don't want to use the ORM. > Here is what I want to do:
> > A similar thread > > http://groups.google.com/group/sqlalchemy/browse_thread/thread/b9e42756eb2513b0/a372495356e4eb5e?lnk=raot If you dont want to use the ORM or Session, you can use connections directly, using "begin_twophase" to get back a transaction, and prepare()/commit() on each transaction. begin_twophase is here: http://www.sqlalchemy.org/docs/reference/sqlalchemy/connections.html?highlight=begin_twophase#sqlalchemy.engine.base.Connection.begin_twophase it appears I need to add TwoPhaseTransaction to the docs but its like: engine1 = create_engine(...) engine2 = create_engine(...) conn1 = engine1.connect() conn2 = engine2.connect() trans1 = conn1.begin_twophase() trans2 = conn2.begin_twophase() .... trans1.prepare() trans2.prepare() trans1.commit() trans2.commit() conn1.close() conn2.close() the notes that Ants Aasma has in that thread are also significant. > > Regards > Paul > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to sqlalch...@googlegroups.com. > To unsubscribe from this group, send email to > sqlalchemy+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/sqlalchemy?hl=en. > > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.