line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DBIx::CouchLike::Sth; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
43
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
20
|
|
|
1
|
|
|
|
|
34
|
|
5
|
1
|
|
|
1
|
|
5
|
use base qw/ Class::Accessor::Fast /; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
322
|
|
6
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw/ sth sql trace quote /); |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub execute { |
9
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
10
|
|
|
|
|
|
|
|
11
|
0
|
0
|
|
|
|
|
if ( my $h = $self->{trace} ) { |
12
|
0
|
|
|
|
|
|
my @params = map { $self->{quote}->($_) } @_; |
|
0
|
|
|
|
|
|
|
13
|
0
|
|
|
|
|
|
my $sql = $self->{sql}; |
14
|
0
|
|
|
|
|
|
$sql =~ s/\?/shift @params/eg; |
|
0
|
|
|
|
|
|
|
15
|
0
|
|
|
|
|
|
print $h "TRACE >> $sql\n"; |
16
|
|
|
|
|
|
|
} |
17
|
0
|
|
|
|
|
|
$self->{sth}->execute(@_); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub fetchrow_arrayref { |
21
|
0
|
|
|
0
|
0
|
|
shift->{sth}->fetchrow_arrayref(@_); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub finish { |
25
|
0
|
|
|
0
|
0
|
|
shift->{sth}->finish(@_); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |