added dev comments about per-cursor wrapper
[dbsrgits/DBIx-Class-RowCountStatistics.git] / lib / DBIx / Class / RowCountStatistics / Storage.pm
CommitLineData
f6e5b275 1use strict;
2use warnings;
3
da7d8a54 4# per-Cursor wrapper object to cache and access SQL later
ef422264 5package DBIx::Class::RowCountStatistics::Storage;
f6e5b275 6use Class::Method::Modifiers;
7
8sub new {
9 my ($class, $original) = @_;
10 return bless {
11 original => $original,
12 }, $class;
13}
14
15sub _cached_sql {
16 my ($self) = @_;
17 return $self->{cached_sql};
18}
19
20sub throw_exception {
21 my $self = shift;
22 return $self->{original}->throw_exception(@_);
23}
24
25sub _select {
26 my $self = shift;
27 my @res = $self->{original}->_select(@_);
28 $self->{cached_sql} = $res[1]{Statement};
29 return @res;
30}
31
32sub debug {
33 my $self = shift;
34 return $self->{original}->debug(@_);
35}
36
37sub debugobj {
38 my $self = shift;
39 return $self->{original}->debugobj(@_);
40}
41
421;