line |
true |
false |
branch |
24
|
0 |
23 |
eval {
do {
require DBD::mysql;
1
}
} ? : |
25
|
0 |
23 |
eval {
do {
require DBD::Pg;
1
}
} ? : |
26
|
23 |
0 |
eval {
do {
require DBD::SQLite;
'DBD::SQLite'->VERSION(1.48);
1
}
} ? : |
27
|
0 |
23 |
$INC{'DBI/PurePerl.pm'} ? : |
109
|
17 |
36 |
unless @_ > 1 |
118
|
0 |
15 |
wantarray ? : |
124
|
0 |
15 |
if ($probability and int((rand()) * $probability) % $probability != 0) |
130
|
5 |
10 |
if (my $attrs = $sth->{'private_DBIx_QueryLog_attrs'}) |
134
|
6 |
0 |
if $bind_params |
138
|
0 |
15 |
$dbh->{'Driver'}{'Name'} eq 'Pg' ? : |
141
|
2 |
13 |
if ($container->{'explain'} or $ENV{'DBIX_QUERYLOG_EXPLAIN'}) |
145
|
9 |
6 |
unless ($container->{'skip_bind'} || $ENV{'DBIX_QUERYLOG_SKIP_BIND'} and @params) |
150
|
0 |
15 |
$wantarray ? : |
155
|
0 |
15 |
$wantarray ? : |
166
|
6 |
0 |
unless ref $attr eq 'HASH' |
184
|
0 |
12 |
if ($probability and int((rand()) * $probability) % $probability != 0) |
188
|
0 |
12 |
ref $stmt ? : |
191
|
6 |
6 |
if ($container->{'explain'} or $ENV{'DBIX_QUERYLOG_EXPLAIN'}) |
195
|
11 |
1 |
unless ($container->{'skip_bind'} || $ENV{'DBIX_QUERYLOG_SKIP_BIND'} and @bind) |
201
|
5 |
7 |
if ($is_selectrow_array) { } |
202
|
0 |
5 |
$wantarray ? : |
211
|
5 |
7 |
if ($is_selectrow_array) |
212
|
0 |
5 |
$wantarray ? : |
222
|
0 |
332 |
wantarray ? : |
225
|
8 |
324 |
if ($dbh->{'Driver'}{'Name'} ne 'mysql' and $dbh->{'Driver'}{'Name'} ne 'Pg' and not $dbh->{'Driver'}{'Name'} eq 'SQLite' && 1 && !@bind) |
230
|
180 |
144 |
if ($probability and int((rand()) * $probability) % $probability != 0) |
237
|
8 |
136 |
if ($container->{'explain'} or $ENV{'DBIX_QUERYLOG_EXPLAIN'}) |
241
|
144 |
0 |
unless ($container->{'skip_bind'} || $ENV{'DBIX_QUERYLOG_SKIP_BIND'} and @bind) |
246
|
0 |
144 |
$wantarray ? : |
251
|
0 |
142 |
$wantarray ? : |
259
|
2 |
14 |
unless $ret =~ m[
\A # at start of string
(?:
\s* # white space
(?: /\* .*? \*/ )* # /* ... */
\s* # while space
)*
SELECT
\s* # white space
.+? # columns
\s* # white space
FROM
\s* # white space
]imsx |
278
|
0 |
14 |
if ($dbh->{'Driver'}{'Name'} eq 'mysql' or $dbh->{'Driver'}{'Name'} eq 'Pg') { } |
|
14 |
0 |
elsif ($dbh->{'Driver'}{'Name'} eq 'SQLite') { } |
291
|
0 |
14 |
if $DBI::err |
295
|
4 |
10 |
unless defined $args{'print'} and $args{'print'} |
299
|
40 |
0 |
defined $_ ? : |
309
|
0 |
178 |
if ($dbh->{'Driver'}{'Name'} eq 'mysql' or $dbh->{'Driver'}{'Name'} eq 'Pg') { } |
312
|
0 |
0 |
if ($1 eq '?') { } |
|
0 |
0 |
elsif ($1 eq ')') { } |
315
|
0 |
0 |
$pos >= 6 && substr($ret, $pos - 6, 6) =~ /\A[Ll](?:IMIT|imit) \z/ ? : |
317
|
0 |
0 |
if ($limit_flag) { } |
322
|
0 |
0 |
if (defined $type and $dbh->{'Driver'}{'Name'} eq 'Pg' and $type == 0) |
325
|
0 |
0 |
defined $type ? : |
344
|
2 |
167 |
unless not $threshold or $time > $threshold |
351
|
167 |
8 |
unless ($SKIP_PKG_MAP{$c[0]} or $c[0] =~ /^DB[DI]::/) |
358
|
7 |
160 |
if ($container->{'skip_bind'} or $ENV{'DBIX_QUERYLOG_SKIP_BIND'}) |
360
|
7 |
0 |
if @$bind_params |
363
|
2 |
165 |
if ($container->{'compact'} or $ENV{'DBIX_QUERYLOG_COMPACT'}) |
370
|
97 |
187 |
if (not $quote_char and $s eq ' ' || $s eq "\n" || $s eq "\t" || $s eq "\r") { } |
|
20 |
167 |
elsif ($s eq q['] or $s eq '"' or $s eq '`') { } |
|
1 |
166 |
elsif (not $before_escape and $quote_char and $s eq '\\') { } |
|
133 |
33 |
elsif (not $quote_char) { } |
371
|
51 |
46 |
if $skip_space |
377
|
8 |
12 |
if (not $quote_char) { } |
|
7 |
5 |
elsif (not $before_escape and $s eq $quote_char) { } |
391
|
2 |
131 |
if ($s eq '(') { } |
|
4 |
254 |
elsif ($s eq ')' || $s eq ',' and substr($buff, -1, 1) eq ' ') { } |
406
|
2 |
165 |
if ($container->{'useqq'} or $ENV{'DBIX_QUERYLOG_USEQQ'}) |
423
|
2 |
165 |
$container->{'show_data_source'} || $ENV{'DBIX_QUERYLOG_SHOW_DATASOURCE'} ? : |
|
1 |
166 |
$color ? : |
425
|
3 |
164 |
if (my $logger = $container->{'logger'}) { } |
426
|
2 |
1 |
$explain ? : |
443
|
11 |
153 |
if (ref $OUTPUT eq 'CODE') { } |
444
|
2 |
9 |
$explain ? : |
459
|
10 |
143 |
$explain ? : |
472
|
1 |
1 |
if ((shift())->[0]) { } |