On Sun, Jun 10, 2007 at 09:03:18AM -0500, Brandon Black wrote:
> On 6/10/07, Nilson Santos Figueiredo Junior <[EMAIL PROTECTED]> wrote:
> >On 6/7/07, Brandon Black <[EMAIL PROTECTED]> wrote:
> >> We have a second release candidate now after the (much appreciated)
> >> feedback from the first one. Most of the issues were related to
> >> module dependency issues in the build/test process rather than real
> >> code regressions, so it's looking pretty good so far. Please give
> >> this one a good testing too. While you're waiting for CPAN to get a
> >> copy, you can fetch it directly from:
> >
> >I still got one failing test case for a bug I've first reported back
> >in December.
> >Paging is still broken for chained resultsets.
> >
> >I'm resending the patch to 67pager.t which makes this issue pop up
> >along with this message.
> >
>
> "order by" and limit are tightly related in SQL, and afaik you can
> only have one of each. For your simple case, it's easy to say that:
>
> $rs->search({}, { rows => 2, page => 2})->search(undef, { order_by =>
> 'title'})
>
> should be interpreted as:
>
> ORDER BY title LIMIT 2 OFFSET 2
>
> And perhaps this:
>
> $rs->search({}, { rows => 7, page => 3, order_by => 'title'
> })->search(undef, { rows => 2, page => 2, order_by => 'artist' })
>
> should be interpreted as:
>
> ORDER BY title, artist LIMIT 2 OFFSET 16
That would be ideal but would be singificant work. What I've now done means
$rs->search({}, { offset => 14, ... })
->search(undef, { rows => 2, page => 2, order_by => 'artist' })
will behave itself but page-within-page doesn't.
If anybody actually -does- page-within-page, shout out with test cases and
we'll see what we can do, otherwise I think we can probably call this "good
enough".
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/