[Zope-DB] Re: ZPsycopgDA (version 1.0.13) problems
Dieter Maurer
dieter@handshake.de
Fri, 24 Jan 2003 00:22:57 +0100
Jon Erickson wrote at 2003-1-22 09:24 -0600:
> On Tue, 2003-01-21 at 13:47, Dieter Maurer wrote:
> > > Passing None as max_rows to mean "no limits" is much more
> > > meaningful here, IMHO.
> > The problem here is, that the value should be changable by the ZMI.
> > There, "None" for "no limits" and an integer for "that many rows"
> > is not very good, as the content managers may not know Python.
>
> How about a null max_rows value to equal "no limits". If the content
> manager wants all rows from the query returned, he leaves max_rows
> blank. If he wants to restrict the size of the result set, he can
> provide an integer value.
>
> To me, it seems non-intuative that a max_rows value of "0" == "return
> all rows".
"0" as "no limit" is used in many places in Zope:
* some DA's
* cache manager
* session data
Dieter