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 absolutely solve my problem. E Sent from my BlackBerry 10 smartphone on the Rogers network.
On Jan 11, 2014, at 1:11 PM, Ed Willis <[email protected]> wrote:
event.listen() accepts an Engine instance, not just a class, as a target: db1 = create_engine(..) db2 = create_engine(..) db3 = create_engine(..) @event.listens_for(db1, “execute”) def only_db1_events(…): … hope this helps
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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/groups/opt_out. | ||
- [sqlalchemy] Multiple databases and event.listen? Ed Willis
- Re: [sqlalchemy] Multiple databases and event.listen? Michael Bayer
- Re: [sqlalchemy] Multiple databases and event.liste... ewillis
