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 |
17 |
wantarray ? : |
124
|
0 |
17 |
if ($probability and int((rand()) * $probability) % $probability != 0) |
130
|
7 |
10 |
if (my $attrs = $sth->{'private_DBIx_QueryLog_attrs'}) |
134
|
10 |
0 |
if $bind_params |
138
|
0 |
17 |
$dbh->{'Driver'}{'Name'} eq 'Pg' ? : |
141
|
2 |
15 |
if ($container->{'explain'} or $ENV{'DBIX_QUERYLOG_EXPLAIN'}) |
145
|
9 |
8 |
unless ($container->{'skip_bind'} || $ENV{'DBIX_QUERYLOG_SKIP_BIND'} and @params) |
150
|
0 |
17 |
$wantarray ? : |
155
|
0 |
17 |
$wantarray ? : |
166
|
10 |
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
|
176 |
148 |
if ($probability and int((rand()) * $probability) % $probability != 0) |
237
|
8 |
140 |
if ($container->{'explain'} or $ENV{'DBIX_QUERYLOG_EXPLAIN'}) |
241
|
148 |
0 |
unless ($container->{'skip_bind'} || $ENV{'DBIX_QUERYLOG_SKIP_BIND'} and @bind) |
246
|
0 |
148 |
$wantarray ? : |
251
|
0 |
146 |
$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 |
182 |
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 |
173 |
unless not $threshold or $time > $threshold |
351
|
173 |
8 |
unless ($SKIP_PKG_MAP{$c[0]} or $c[0] =~ /^DB[DI]::/) |
358
|
9 |
164 |
if ($container->{'skip_bind'} or $ENV{'DBIX_QUERYLOG_SKIP_BIND'}) |
360
|
9 |
0 |
if (@$bind_params) |
361
|
9 |
2 |
defined $_ ? : |
366
|
2 |
171 |
if ($container->{'compact'} or $ENV{'DBIX_QUERYLOG_COMPACT'}) |
373
|
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) { } |
374
|
51 |
46 |
if $skip_space |
380
|
7 |
5 |
do {
$s eq $quote_char if not $before_escape
} ? : |
|
12 |
8 |
$quote_char ? : |
383
|
11 |
1 |
if not $before_escape |
394
|
2 |
131 |
if ($s eq '(') { } |
|
4 |
254 |
elsif ($s eq ')' || $s eq ',' and substr($buff, -1, 1) eq ' ') { } |
409
|
2 |
171 |
if ($container->{'useqq'} or $ENV{'DBIX_QUERYLOG_USEQQ'}) |
426
|
2 |
171 |
$container->{'show_data_source'} || $ENV{'DBIX_QUERYLOG_SHOW_DATASOURCE'} ? : |
|
1 |
172 |
$color ? : |
428
|
3 |
170 |
if (my $logger = $container->{'logger'}) { } |
429
|
2 |
1 |
$explain ? : |
446
|
11 |
159 |
if (ref $OUTPUT eq 'CODE') { } |
447
|
2 |
9 |
$explain ? : |
462
|
10 |
149 |
$explain ? : |
475
|
1 |
1 |
if (+(shift())->[0]) { } |