[Zope] Adding to Zsql method result object

Alexis Roda alexis.roda at urv.es
Fri Sep 3 04:57:32 EDT 2004


Peter Millar wrote:
> I have a query returning data from the zsql method.
> 
> How can I append to the results object that I receive.
> 
> Lets say I select a,b,c from mytable
> 
> I get a results object . from my use/reading of this it is a list of
> dictionaries ...

No, it is an object that emulates a tuple of "brain records". It stores 
raw records (tuples/lists?) + query schema information + a class object 
and implements lazy instantiation of records.

Results objects have a dictionaries() method that returns a list of 
dictionaries.

For more details take a look at $ZOPE/lib/python/Shared/DC/ZRDB/Results.py.





HTH
-- 
                                    ////
                                   (@ @)
----------------------------oOO----(_)----OOo--------------------------
<>               Ojo por ojo y el mundo acabara ciego
/\ Alexis Roda - Universitat Rovira i Virgili - Reus, Tarragona (Spain)
-----------------------------------------------------------------------



More information about the Zope mailing list