[Dbix-class] Running $rs->count() on full resultset?

Jesse Sheidlower jester at panix.com
Mon Apr 10 03:49:12 CEST 2006


I'm dynamically constructing my $rs search statements, and including
"page" and "rows" values in my attribute hash, for paged results.

In my display template, I'd like to do something like "25837
records found; displaying 50-100". However, when I call
$rs->count() to get the count, I'm only getting the value of
"rows" or less; that is, I get the count of my particular page
of the resultset, rather than on the complete search. This
despite the fact that the SQL I get from running under
DBIX_CLASS_STORAGE_DBI_DEBUG=1 does not specify any kind of
limit.

How do I get the full count from my resultset?

Jesse Sheidlower



More information about the Dbix-class mailing list