[Dbix-class] extended paging

Rodrigo rodrigolive at gmail.com
Wed Dec 2 10:38:32 GMT 2009


> Then the script fetches the second page. But where do you start

>  > scanning? You would have to somehow remember where the end of the
> > first page was.
>

Yup, you're right. In fact, as I'm writing a poc module now (based on
Data::Stream::Bulk), after filtering I'm storing the offset of the results
returned. So, on the next request I know where to start... except that next
time it's another Catalyst request, in another process, etc, etc. And
offsets and resultsets will most likely be gone.

So I'm thinking either to cache it or to store it in a search index table,
like you suggested. That way at least I can keep track of data from request
to request.

Actually this is not just about localization, which is pretty static and
could be perfectly stored in a separate table. I also have to process a lot
of the data thru some other, much more dynamic functions which will convert
(or add fields) to the results before showing them to the user.

Sorting: that's another thing that will mess things up even more. So I'm
leaning towards using a separate, temporary results table. I guess I'll have
to read on the "Search Results" paradigm to look for more answers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20091202/c72=
3f36a/attachment.htm


More information about the DBIx-Class mailing list