Re: [cx-oracle-users] looking for a quicker / more elegant way to form objects with attributes out
Brought to you by:
atuining
From: Massa, H. A. <ch...@gh...> - 2011-03-03 13:36:34
|
Amaury, >> To be able to return an cx_Oracle result set as a "set of records" >> from a function (which is similiar to the "table returning functions" >> within Oracle), the columns of the record need to be attributes of an >> object. Actually I do: > > I'd do it with a "row factory", here are two examples, one which > builds a dictionary, the other one builds a "named tuple" and is > very similar to sqlite3.Row. Thank you very much for those row-factory examples! With those I will be able to reduce the "data-moving-around-in-memory" part of my usage. So I am still missing out a more elegant way to have those columns transformed to attributes of an object... Thanks so far, Harald -- GHUM GmbH Harald Armin Massa Spielberger Straße 49 70435 Stuttgart 0173/9409607 Amtsgericht Stuttgart, HRB 734971 - persuadere. et programmare |