[Zope] Batches in ZPT: not stateful, yet...
Tom Emerson
tree@basistech.com
Tue, 21 Jan 2003 18:03:39 -0500
Chris McDonough writes:
> On Tue, 2003-01-21 at 17:50, Tom Emerson wrote:
> > Right, I got that. But the batch itself: if I have a SQL method that
> > is returning a result set, is that called for each subset of records
> > in the batch?
>
> Yes, it is (modulo any caching you're doing on the SQL method).
OK, that is what I feared. I take it the magic insertion of a LIMIT on
the SQL query happens automagically? Or does the whole thing get
returned and bits dropped?
Within ZPT it looks like it would be possible to subclass
ZTUtils.Batch to be more intelligent about fetching information...
Anyway, thanks Chris for your help.
-tree
--
Tom Emerson Basis Technology Corp.
Software Architect http://www.basistech.com
"Beware the lollipop of mediocrity: lick it once and you suck forever"