test that SQL statement was passed in
[dbsrgits/DBIx-Class-RowCountStatistics.git] / lib / CtrlO / DBIC / Cursor / RowCountStatistics.pm
CommitLineData
231ba12b 1use strict;
2use warnings;
3
4package CtrlO::DBIC::Cursor::RowCountStatistics;
5use Class::Method::Modifiers;
6
7use parent 'DBIx::Class::Storage::DBI::Cursor';
8
9our $VERSION = '0.000001'; # 0.0.1
10$VERSION = eval $VERSION;
11
12after next => sub {
13 my ($self) = @_;
14 $self->{_ctrlo_rcs_count}++
15 unless $self->{_done};
16};
17
18before __finish_sth => sub {
19 my ($self) = @_;
20 my $sql = $self->sth->{Statement};
21 $self->storage->debugobj->query_complete(
22 $self->{_ctrlo_rcs_count} || 0,
23 $sql,
24 # TODO pass bind params
25 ) if $self->storage->debug;
26};
27
281;
29
30=head1 NAME
31
32CtrlO::DBIC::Cursor::RowCountStatistics - Description goes here
33
34=head1 SYNOPSIS
35
36=head1 DESCRIPTION
37
38=head1 AUTHOR
39
40 r.sedlacek@shadowcat.co.uk
41
42=head1 CONTRIBUTORS
43
44None yet - maybe this software is perfect! (ahahahahahahahahaha)
45
46=head1 COPYRIGHT
47
48Copyright (c) 2015 the CtrlO::DBIC::Cursor::RowCountStatistics L</AUTHOR> and L</CONTRIBUTORS>
49as listed above.
50
51=head1 LICENSE
52
53This library is free software and may be distributed under the same terms
54as perl itself.