the idea I suggested of this:
engine.set_current(connection) # now everyone uses 'connection'
engine.restore_previous() # put the old one back.
or similar, would be the most direct drop-in replacement for the
ProxyEngine....the SQLEngine your tables are associated with gets
switched directly to different connections. this sort of implies the
SQLEngine might become something else and most of the database
connection/dialect stuff moves into the connection object. im still
playing with SQLEngine, and the connection/schema/transaction
concepts to work out the best way to do this. that you want to get
rid of ProxyEngine adds another constraint to the mix :).
On Apr 6, 2006, at 11:53 PM, jason pellerin wrote:
I was referring to the logic in ProxyEngine/
BaseProxyEngine.__getattr__ and how inefficient that was on every
engine attribute lookup. Every call does extra attribute lookups,
which can get quite expensive in a tight inner loop. Here's an
expanded version of __getattr__:
As the original author of ProxyEngine, I have to say that I heartily
agree. It is a hack: a patched-in workaround for init behavior in
earlier versions of SA that didn't work for me. I'm excited to see
things like changeset [1258] that indicate that SA is getting lazier
in all the right places. :) I hope one day soon ProxyEngine will be
completely vestigial.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users