[Zope] ZSQLmethods don't return a list?!

alex@quad.com.ar alex@quad.com.ar
Tue, 4 Sep 2001 21:50:02 -0300


that didn't work either, but here's how to make it work:
sql=list(context.mySqlMethod())
casting a list, makes it work as I wanted it to =)



----- Original Message ----- 
From: "Oliver Bleutgen" <myzope@gmx.net>
To: <zope@zope.org>
Sent: Tuesday, September 04, 2001 7:32 PM
Subject: Re: [Zope] ZSQLmethods don't return a list?!


> hey guys

> I created a ZSQL Method "SELECT * FROM users" which returns 10 rows
> now in a python script:
> type = context.type
> sql = context.mySqlMethod()
> return type(sql)

> this returns: <type 'instance'>
> while I expected <type 'list'>

try
...
sql = contet.mySqlMethod.dictionaries()
return sql

and look at that output...


cheers,
oliver

_______________________________________________
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 )