[Zope] ZODBC and dictionaties

peter sabaini sabaini@inode.at
Tue, 01 Oct 2002 16:47:01 +0200


yep that sucks, i do something like this to get dicts (probably wildly 
inefficient):

     def dictionaries(rs):
         'Return a list of result objects as a list of dictionaries'
         r=[]
         a=r.append
         names=rs.names()
         for row in rs:
             d={}
             for n in names: d[n]=row[n]
             a(d)
         return r


Chris Withers wrote:
> Oliver Marx wrote:
> 
>> Well, the point is that ZODBCDA returns a ZSQL-resultset which doesn't 
>> have the dictionaries attribute ;)
> 
> 
> Why doesn't it?
> 
> that sucks :-(
> 
> Sorry for the wild goose chase...
> 
> Chris
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
> 
>