[Zope-dev] Using psycopg cursor in a product

de ZORZI Frederic fredz@pimentech.net
Fri, 08 Feb 2002 12:47:56 +0100


> Hi all,
> Is it possible to use cursors and their functions (dictfetchall, 
> fetchone...)  with zpsycopg connection ?
> 

Easy stupid :) :

conn = getattr(self, self.connection_id)
db = conn().db
		
curs = db.cursor()
curs.execute("select * from support limit 2")
return "%s" % curs.dictfetchall()


Now, how about managing transactions ?