So, I have worked on a first prototype, and was unable to use the event system as-is, because of a lack of context to know which database the user is trying to access.
So, after a bit of hacking, here's what I have done: http://tarek.pastebin.mozilla.org/1372473 - the url is passed along the ConnectionFairy checkout method, so I can decide if I have to switch the database - I keep a few globals to decide lazily if a database should be initialized - I keep one engine and one pool *per server* it seems to work, here's an example of usage with the query() function: http://tarek.pastebin.mozilla.org/1372476 So, now I am pretty sure most of this code is crappy, and there's a better way to do this. I still need to make sure all of this is thread-safe. Thoughts ? Feedback ? Cheers Tarek -- Tarek Ziadé | http://ziade.org -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@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.