Commit 6ee0ff64 authored by Jim Fulton's avatar Jim Fulton

Added methods tuples and dictionaries for getting Results as lists of

tuples or lists of dictionaries.  This is somwhat useful for xml-rpc.
parent e2fcfa2c
......@@ -176,6 +176,20 @@ class Results:
if parent is None: return fields
return fields.__of__(parent)
def tuples(self):
return map(tuple, self)
def dictionaries(self):
r=[]
a=r.append
names=self.names()
for row in self:
d={}
for n in names: d[n]=row[n]
a(d)
return r
def asRDB(self): # Waaaaa
r=[]
append=r.append
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment