005a92bfeda6aab16a3e618a68e86cc7db8f7cb3
[dbsrgits/DBIx-Class-RowCountStatistics.git] / lib / CtrlO / DBIC / Cursor / RowCountStatistics / Storage.pm
1 use strict;
2 use warnings;
3
4 package CtrlO::DBIC::Cursor::RowCountStatistics::Storage;
5 use Class::Method::Modifiers;
6
7 sub new {
8     my ($class, $original) = @_;
9     return bless {
10         original => $original,
11     }, $class;
12 }
13
14 sub _cached_sql {
15     my ($self) = @_;
16     return $self->{cached_sql};
17 }
18
19 sub throw_exception {
20     my $self = shift;
21     return $self->{original}->throw_exception(@_);
22 }
23
24 sub _select {
25     my $self = shift;
26     my @res = $self->{original}->_select(@_);
27     $self->{cached_sql} = $res[1]{Statement};
28     return @res;
29 }
30
31 sub debug {
32     my $self = shift;
33     return $self->{original}->debug(@_);
34 }
35
36 sub debugobj {
37     my $self = shift;
38     return $self->{original}->debugobj(@_);
39 }
40
41 1;