Re: [cx-oracle-users] Results as dict
Brought to you by:
atuining
From: Hancock, D. (DHANCOCK) <DHA...@ar...> - 2006-11-09 13:16:04
|
We've been using dtuple for several years to do the same thing. You can get it at: http://www.lyra.org/greg/python/dtuple.py Cheers! --=20 David Hancock | dha...@ar... From: Walter D=F6rwald <wa...@li...> Organization: LivingLogic AG, Bayreuth/Germany Reply-To: <cx-...@li...> Date: Thu, 9 Nov 2006 03:59:38 -0500 To: <cx-...@li...> Conversation: [cx-oracle-users] Results as dict Subject: Re: [cx-oracle-users] Results as dict Chris Dunscombe wrote: > > --- Anthony Tuininga <ant...@gm...> wrote: > >> Ah, I see. You can do the same thing with cx_Oracle (create a >> subclassed cursor that returns rows as dictionaries) quite easily. Its >> simply not "out of the box" as you say. There is an implicit >> performance penalty involved (dictionaries cost a great deal more to >> build than tuples do relatively speaking) so I've tended to avoid such >> techniques. My personal preference for when performance is not an >> issue is to return objects with attributes defined for each of the >> columns. Both of these techniques are possible to use without any help >> from any module author and should be available globally as a recipe or >> some such. Would there be appreciation for including such things as >> part of documentation or sample files? > > I would appreciate these sort things very much. ll-orasql (http://www.livinglogic.de/Python/orasql/) implements that kind of functionality (i.e. column access via row.column and row["column"])= . Servus, Walter ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=3Dlnk=3D120709=3D263057=3D121642 <http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D121642> _______________________________________________ cx-oracle-users mailing list cx-...@li... https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |