What kind of objects is returned from Z SQL objects?
Dear List, I have two ZSQL objects and I want to 'add' them. First I thought that the returned objects behave like dictionaries, but that seems not to be the case. Any ideas? \Oliver -- Oliver Marx TEKK ApS Lyngbyvej 20 2100 København Ø 39 15 80 60
Oliver Marx wrote:
Dear List,
I have two ZSQL objects and I want to 'add' them.
First I thought that the returned objects behave like dictionaries, but that seems not to be the case.
Any ideas?
They are "brains", see lib/python/Shared/DC/ZRDB/Results.py of your local Zope for the source. They have for instance a method dictionaries() which returns your result set as a dictionary, e.g. result = yoursqlmethod(....) result_dict = result.dictionaries() should give you a dictionary in a python script. HTH, oliver
participants (2)
-
Oliver Bleutgen -
Oliver Marx