<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi,</p>
<p>it does return it in the totalcount property by default.</p>
<p>The name can be configured with the 'total_entries_arg' config parameter: <a class="moz-txt-link-freetext" href="https://metacpan.org/pod/Catalyst::Controller::DBIC::API#count_arg,-page_arg,-select_arg,-search_arg,-grouped_by_arg,-ordered_by_arg,-prefetch_arg,-as_arg,-total_entries_arg">
https://metacpan.org/pod/Catalyst::Controller::DBIC::API#count_arg,-page_arg,-select_arg,-search_arg,-grouped_by_arg,-ordered_by_arg,-prefetch_arg,-as_arg,-total_entries_arg</a><br>
</p>
<p>Best regards, Alex<br>
</p>
<br>
<div class="moz-cite-prefix">On 2017-03-19 18:38, Dimitar Petrov wrote:<br>
</div>
<blockquote cite="mid:8D3DE0E4-717B-43FB-90B1-5BC5C1C89E16@gmail.com" type="cite">
Hello Rajesh,
<div class=""><br class="">
</div>
<div class="">I usually have my own: MyApp::REST which extends&nbsp;</div>
<div class="">
<pre style="font-variant-ligatures: normal; orphans: 2; widows: 2; word-wrap: break-word; white-space: pre-wrap;" class="">package MyApp::REST;
use Moose;
use Try::Tiny;
use DBIx::Class::ResultSet::RecursiveUpdate;
use Scalar::Util qw( reftype );

BEGIN { extends 'Catalyst::Controller::DBIC::API::REST' }

with 'Iris::Web::TraitFor::Controller::Datatables';</pre>
<div class=""><br class="">
</div>
</div>
<div class="">….</div>
<div class=""><br class="">
</div>
<div class="">and later on modifier:</div>
<div class=""><br class="">
</div>
<div class="">
<pre style="font-variant-ligatures: normal; orphans: 2; widows: 2; word-wrap: break-word; white-space: pre-wrap;" class="">=head2 list_format_output

Add more information about current search 

=cut

after 'list_format_output' =&gt; sub {
  my ($self, $c) = @_;

  if (!$self-&gt;has_errors($c) &amp;&amp; $c-&gt;req-&gt;has_search_total_entries) {
    my $current_result_set = $c-&gt;req-&gt;current_result_set;

    $c-&gt;stash-&gt;{ $self-&gt;stash_key }{last_page}            = $current_result_set-&gt;pager-&gt;last_page &#43; 0;
    $c-&gt;stash-&gt;{ $self-&gt;stash_key }{current_page}         = $current_result_set-&gt;pager-&gt;current_page &#43; 0;
    $c-&gt;stash-&gt;{ $self-&gt;stash_key }{entries_per_page}     = $current_result_set-&gt;pager-&gt;entries_per_page &#43; 0;
    $c-&gt;stash-&gt;{ $self-&gt;stash_key }{entries_on_this_page} = $current_result_set-&gt;pager-&gt;entries_on_this_page &#43; 0;
  }
};</pre>
<div class="">Best regards,</div>
</div>
<div class=""><br class="">
</div>
<div class="">
<div>
<blockquote type="cite" class="">
<div class=""><br class="">
</div>
<div class="">On Mar 19, 2017, at 09:28, Rajesh Kumar Mallah &lt;<a moz-do-not-send="true" href="mailto:mallah@redgrape.tech" class="">mallah@redgrape.tech</a>&gt; wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Hi ,<br class="">
<br class="">
We know that Catalyst::Controller::DBIC::API supports paging<br class="">
via list_count &nbsp;, list_page and list_offset &nbsp;options and<br class="">
its possible to fetch a page of a large result set.<br class="">
<br class="">
However what it does not seems to support is to tell<br class="">
the View(caller) of how many records in total exists , ie<br class="">
the total_entries of the Data::Page object.<br class="">
<br class="">
This compels us to make two queries one to get the total count<br class="">
and another to get the paged result.<br class="">
<br class="">
Does this feature really does not exists or am I missing something?<br class="">
<br class="">
(The reason I love and thoroughly use Catalyst::Controller::DBIC::API is <br class="">
that it allows me to be lazy :p )<br class="">
<br class="">
regds<br class="">
Rajesh Kumar Mallah.<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
_______________________________________________<br class="">
List: <a moz-do-not-send="true" href="mailto:Catalyst@lists.scsys.co.uk" class="">
Catalyst@lists.scsys.co.uk</a><br class="">
Listinfo: <a moz-do-not-send="true" href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" class="">
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br class="">
Searchable archive: <a moz-do-not-send="true" href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" class="">
http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br class="">
Dev site: <a moz-do-not-send="true" href="http://dev.catalyst.perl.org/" class="">
http://dev.catalyst.perl.org/</a><br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset> <br>
<pre wrap="">_______________________________________________
List: <a class="moz-txt-link-abbreviated" href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a>
Listinfo: <a class="moz-txt-link-freetext" href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a>
Searchable archive: <a class="moz-txt-link-freetext" href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a>
Dev site: <a class="moz-txt-link-freetext" href="http://dev.catalyst.perl.org/">http://dev.catalyst.perl.org/</a>
</pre>
</blockquote>
<br>
<br>
<font face="Verdana" color="Purple" size="2"><br>
*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*<br>
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien<br>
Handelsgericht Wien, FN 79340b<br>
*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*<br>
Notice: This e-mail contains information that is confidential and may be privileged.<br>
If you are not the intended recipient, please notify the sender and then<br>
delete this e-mail immediately.<br>
*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*&quot;*<br>
</font>
</body>
</html>