DBIx::Class::Storage::DBI::Role::QueryCounter - Role to add a query counter
my $query_count = $schema->storage->query_count;
Each time the schema does a query, increment the counter.
This package defines the following attributes.
head2 _query_count
Is the attribute holding the current query count. It defines a public reader called 'query_count' which you can use to access the total number of queries that DBIC has run since connection.
This module defines the following methods.
override on the method so that we count the queries.
Used internally. You won't need this unless you enjoy messing with the query count.
See DBIx::Class for more information regarding authors.
You may distribute this code under the same terms as Perl itself.
To install DBIx::Class, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Class
CPAN shell
perl -MCPAN -e shell install DBIx::Class
For more information on module installation, please visit the detailed CPAN module installation guide.