On Feb 20, 2006, at 11:52 PM, Marko Mikulicic wrote:


On 21.02.2006., at 04:10, Michael Bayer wrote:
youre looking for the ProxyEngine : http://www.sqlalchemy.org/ docs/dbengine.myt#dbengine_proxy
(never knew it would be so popular so quick....)

great. you really thought it all!

actually i didnt think of this, it was a trac ticket first posted by Jason Pellerin who also implemented the ProxyEngine.

the more I look at the code the more I'm impressed with the cleaness. Initially I was a little doubtful about the choice of module level functions as opposed to a more pure OOP style however I must admit that style considerations are secondary when things are done right.

well its Python and I had observed a lot of libraries do have a lot of module-level stuff going on....i didnt want to make it too J2EE-ish !


while we are on this, if oids are percieved as an important feature (regardless of postgres discouraging their usage but this is another issue) it could
be interesting having them working with the ProxyEngine.

oids are not too important a feature, mostly because their support is spotty not only in postgres but also mysql is a little flaky about them too. theyre only used as a "default sorting" for mappers, when available.

It seems natural that oid_column_name would be called in the TableImpl so I don't understand why oid_column_name is called before
proxyng through ProxyTableImpl.


it looks like it tries to return the oid column if its available. the ORM uses oid when it calls "default_order_by" on a selectable, and looking at it right now it appears that the calls to default_order_by do all occur at query time, not mapper construction time.

Or simply the comment in proxy.py is outdated and effectively the method will be called when an engine is present ?

without trying it, seems like it should work. so maybe ? i try to leave most testing of the external modules to external resources :)


PS: it seems that the whole thing about oids needs a refactory, for example separate the methods for the column name from that whether to use it or not
which may depend on the table non only on the engine.


youll have to show me an example of what you mean.

- mike


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to