[sqlalchemy] Multiple databases and event.listen?

2014-01-11 Thread Ed Willis
Say I've got more than one database (in my specific example, they're sqlite3 databases). All the databases have the same table declarations in their schemas. I want to listen for insert/update/delete events in one specific database and then propagate data from that database to the others.

Re: [sqlalchemy] Multiple databases and event.listen?

2014-01-11 Thread Michael Bayer
On Jan 11, 2014, at 1:11 PM, Ed Willis ewil...@jesande.com wrote: Say I've got more than one database (in my specific example, they're sqlite3 databases). All the databases have the same table declarations in their schemas. I want to listen for insert/update/delete events in one specific

Re: [sqlalchemy] Multiple databases and event.listen?

2014-01-11 Thread ewillis
Wow, thanks a ton. So if I get you right, I'd register for insert/update/delete events on the engine pointing at the database of interest and then in my callbacks I'd have to first work out the type of the object that was changed and then take appropriate action. Correct?If so, this will

Re: [sqlalchemy] Multiple databases and event.listen?

2014-01-11 Thread Michael Bayer
On Jan 11, 2014, at 2:20 PM, ewil...@jesande.com wrote: Wow, thanks a ton. So if I get you right, I'd register for insert/update/delete events on the engine pointing at the database of interest and then in my callbacks I'd have to first work out the type of the object that was changed and

Re: [sqlalchemy] Multiple databases and event.listen?

2014-01-11 Thread ewillis
That's perfect - thanks a ton!

Re: [sqlalchemy] Anybody have twophase/zope.sqlalchemy/MySQL working?

2014-01-11 Thread Laurence Rowe
On Friday, 10 January 2014 08:06:16 UTC-8, Michael Bayer wrote: maybe. I was thinking, is the Session really doing the right thing here by not getting involved, but I think yeah that still might be appropriate. so we’d need to carry along some extra information about the transaction