Re: [cx-oracle-users] Re: Row values as dictionary
Brought to you by:
atuining
From: Anthony T. <ant...@gm...> - 2005-05-24 18:32:45
|
This is best done by using an external class which manipulates the tuples (and there are several modules that do this) or by subclassing cx_Oracle.Cursor to do it yourself. I believe this is best left for such modules since there is no clear consensus on the matter and the performance penalty is not insigificant. Whether or not it might be helpful to have a hook is another question -- anyone care to comment? On 5/22/05, Jani Tiainen <re...@lu...> wrote: > Jani Tiainen kirjoitti: > > Hi again, > > > > Is there possibility to return row values in dictionary instead simple > > tuple? >=20 > Well let's clarify this a bit. >=20 > I've seen two ways to implement this. First is custom class that can > respond to both, column names or indices (pypgsql and pysqlite does this)= . >=20 > Second is hook to enable usage of custom classes in generation of rows, > this is done at least in pysqlite2. >=20 > I just wondered could one (maybe latter is better one) be implemented in > cx_Oracle directly. Of course this could be done by inheriting > cx_Oracle's cursor-class. >=20 > -- >=20 > Jani Tiainen >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by Oracle Space Sweepstakes > Want to be the first software developer in space? > Enter now for the Oracle Space Sweepstakes! > http://ads.osdn.com/?ad_id=3D7412&alloc_id=3D16344&op=3Dclick > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |