[Zope] PoPy and Delete results

Chris Gray cpgray@library.uwaterloo.ca
Tue, 28 Nov 2000 10:40:10 -0500 (EST)


Thanks for the response, Dieter.

For consistency within Zope, an integer result could still be repackaged
as a sequence result.

For now I can do what I wanted to by:

select count(food) from penguins
where food='Henri Bergson'

(thus getting the number of records about to be affected by a delete 
as a sequence result) before running:

delete from penguins
where food='Henri Bergson'

Cheers,
Chris

On Tue, 28 Nov 2000, Dieter Maurer wrote:

> Chris Gray writes:
>  > In psql a delete command returns a count of the number of rows
>  > deleted.  Is this returned result available to a ZSQL method using PoPy or
>  > PyGreSQL?
> I think, Zope should pass integer results from SQL commands.
> But I fear, it does not.
> 
> When I looked at the code (quite some time ago), I had the impression,
> that Zope does only pass sequence results. Integer results
> are translated into 'None'.
> 
> 
> Dieter
> 
> _______________________________________________
> 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 )
>