line |
true |
false |
branch |
111
|
0 |
1 |
exists $overrides->{'LongTruncOk'} ? : |
|
0 |
1 |
exists $overrides->{'NULL'} ? : |
129
|
0 |
1 |
if (_is_connected($self->{'dbh'})) |
137
|
0 |
0 |
unless $SQL::Shell::Settings{$key} |
144
|
0 |
2 |
unless $SQL::Shell::Settings{$key} |
151
|
0 |
0 |
unless ref $renderers eq 'HASH' |
160
|
0 |
0 |
unless defined $renderers |
161
|
0 |
0 |
unless ref $renderers eq 'ARRAY' |
163
|
0 |
0 |
unless delete $self->{'renderers'}{$_} |
170
|
0 |
1 |
unless ref $cmds eq 'HASH' |
179
|
0 |
1 |
unless defined $cmds |
180
|
0 |
1 |
unless ref $cmds eq 'ARRAY' |
182
|
0 |
1 |
unless delete $self->{'commands'}{$_} |
201
|
0 |
0 |
unless _is_connected($self->{'dbh'}) |
224
|
1 |
0 |
if $self->{'settings'}{'Verbose'} |
226
|
0 |
1 |
unless my $file = 'IO::File'->new("$script") |
230
|
1 |
1 |
unless $self->execute_cmd($_) |
242
|
1 |
0 |
if defined $history |
277
|
0 |
0 |
unless $level =~ /^(commands|queries|all)$/ |
280
|
0 |
0 |
unless $self->{'LogFH'} = 'IO::File'->new(">> $file") |
282
|
0 |
0 |
if $settings->{'Verbose'} |
290
|
0 |
0 |
if $settings->{'Verbose'} and defined $self->{'LogFH'} |
306
|
0 |
0 |
if ($@ and not $settings->{'AutoCommit'}) |
317
|
0 |
55 |
if _is_connected($self->{'dbh'}) |
326
|
0 |
0 |
if $@ |
348
|
1 |
0 |
unless my $dbh = $self->_dbh |
356
|
0 |
0 |
unless my $dbh = $self->_dbh |
386
|
2 |
7 |
unless defined $value |
387
|
4 |
5 |
if (exists $boolean_settings{$viewable_settings{$setting}}) |
388
|
2 |
2 |
if $value eq '1' |
389
|
2 |
2 |
if $value eq '0' |
391
|
1 |
8 |
if ($setting eq 'escape') |
414
|
1 |
0 |
unless defined $pattern |
416
|
1 |
0 |
unless my $dbh = $self->_dbh |
419
|
0 |
0 |
if ($object eq 'catalogs') { } |
|
0 |
0 |
elsif ($object eq 'schemas') { } |
|
0 |
0 |
elsif ($object eq 'tables') { } |
|
0 |
0 |
elsif ($object eq 'tabletypes') { } |
428
|
0 |
0 |
if ($pattern eq '%') { } |
447
|
1 |
0 |
unless my $dbh = $self->_dbh |
455
|
1 |
0 |
unless my $dbh = $self->_dbh |
464
|
1 |
0 |
unless my $dbh = $self->_dbh |
468
|
0 |
0 |
if $query =~ /^recv\s+/sig |
473
|
0 |
0 |
if (defined $settings->{'LogLevel'} and $settings->{'LogLevel'} eq 'queries' || $settings->{'LogLevel'} eq 'all') |
482
|
0 |
0 |
unless my $dbh = $self->_dbh |
486
|
0 |
0 |
if $statement =~ /^send\s+/sig |
489
|
0 |
0 |
if $rows eq '0E0' |
492
|
0 |
0 |
$cmd eq 'delete' ? : |
|
0 |
0 |
$cmd eq 'update' ? : |
|
0 |
0 |
$cmd eq 'select' ? : |
|
0 |
0 |
$cmd eq 'insert' ? : |
|
0 |
0 |
scalar $cmd =~ /(create|alter|drop)/ ? : |
501
|
0 |
0 |
unless $rows == -1 and not $self->{'settings'}{'Verbose'} |
508
|
1 |
0 |
unless my $dbh = $self->_dbh |
516
|
1 |
0 |
unless my $dbh = $self->_dbh |
524
|
1 |
0 |
unless my $dbh = $self->_dbh |
532
|
0 |
0 |
unless my $dbh = $self->_dbh |
535
|
0 |
0 |
if ($self->{'settings'}{'Interactive'}) |
539
|
0 |
0 |
unless $response eq 'yes' |
546
|
0 |
0 |
if $self->{'settings'}{'Verbose'} |
554
|
1 |
0 |
unless defined $delimiter |
555
|
0 |
1 |
if $cf and not $ct |
556
|
0 |
1 |
if not $cf and $ct |
557
|
0 |
1 |
if ($cf and $ct) |
559
|
0 |
0 |
unless 'Locale::Recode'->resolveAlias($cf) |
560
|
0 |
0 |
unless 'Locale::Recode'->resolveAlias($ct) |
562
|
1 |
0 |
unless my $dbh = $self->_dbh |
564
|
0 |
0 |
if $uri_decode and $self->{'settings'}{'Verbose'} |
566
|
0 |
0 |
if ($cf) |
567
|
0 |
0 |
if $self->{'settings'}{'Verbose'} |
589
|
0 |
0 |
if scalar @row > scalar @headers |
597
|
0 |
0 |
if $recoder |
598
|
0 |
0 |
if $uri_decode |
604
|
0 |
0 |
if $@ |
609
|
0 |
0 |
if $self->{'settings'}{'Verbose'} |
616
|
1 |
0 |
unless my $dbh = $self->_dbh |
618
|
0 |
0 |
if $self->{'settings'}{'Verbose'} |
619
|
0 |
0 |
if (lc $source eq 'all tables') { } |
622
|
0 |
0 |
if $self->{'settings'}{'Verbose'} |
628
|
0 |
0 |
if $self->{'settings'}{'Verbose'} |
641
|
2 |
10 |
if ($param eq 'display-mode') { } |
|
1 |
9 |
elsif ($param eq 'log-mode') { } |
|
1 |
8 |
elsif ($param eq 'escape') { } |
|
1 |
7 |
elsif ($param eq 'enter-whitespace') { } |
|
0 |
7 |
elsif ($param eq 'delimiter') { } |
|
1 |
6 |
elsif ($param eq 'width') { } |
|
1 |
5 |
elsif ($param eq 'auto-commit') { } |
|
1 |
4 |
elsif ($param eq 'longreadlen') { } |
|
1 |
3 |
elsif ($param eq 'longtruncok') { } |
|
1 |
2 |
elsif ($param eq 'multiline') { } |
|
1 |
1 |
elsif ($param eq 'tracing') { } |
643
|
1 |
1 |
unless exists $self->{'renderers'}{$mode} |
648
|
1 |
0 |
unless exists $self->{'renderers'}{$mode} |
653
|
1 |
0 |
unless $mode =~ /(uri-escape|show-whitespace|escape-whitespace|off)/ |
661
|
0 |
0 |
if $settings->{'Verbose'} |
665
|
0 |
1 |
$mode =~ /^off$/i ? : |
|
0 |
1 |
$mode =~ /^on$/i ? : |
666
|
1 |
0 |
unless defined $_onoff |
668
|
0 |
0 |
$settings->{'EnterWhitespace'} ? : |
|
0 |
0 |
if $settings->{'Verbose'} |
673
|
0 |
0 |
if $settings->{'Verbose'} |
677
|
1 |
0 |
unless $mode =~ /^\d+$/ |
679
|
0 |
0 |
if $settings->{'Verbose'} |
683
|
0 |
1 |
$mode =~ /^off$/i ? : |
|
0 |
1 |
$mode =~ /^on$/i ? : |
684
|
1 |
0 |
unless defined $_onoff |
685
|
0 |
0 |
if _is_connected($dbh) |
686
|
0 |
0 |
if $@ |
687
|
0 |
0 |
if $settings->{'Verbose'} |
692
|
1 |
0 |
unless $mode =~ /^\d+$/ |
693
|
0 |
0 |
if _is_connected($dbh) |
694
|
0 |
0 |
if $@ |
695
|
0 |
0 |
if $settings->{'Verbose'} |
700
|
0 |
1 |
$mode =~ /^off$/i ? : |
|
0 |
1 |
$mode =~ /^on$/i ? : |
701
|
1 |
0 |
unless defined $_onoff |
702
|
0 |
0 |
if _is_connected($dbh) |
703
|
0 |
0 |
if $@ |
704
|
0 |
0 |
if $settings->{'Verbose'} |
709
|
0 |
1 |
$mode =~ /^off$/i ? : |
|
0 |
1 |
$mode =~ /^on$/i ? : |
710
|
1 |
0 |
unless defined $_onoff |
715
|
0 |
1 |
if ($mode =~ /^on$/i) { } |
|
0 |
1 |
elsif ($mode =~ /^off$/i) { } |
|
0 |
1 |
elsif ($mode =~ /^deep$/i) { } |
717
|
0 |
0 |
if $settings->{'Verbose'} |
721
|
0 |
0 |
if $settings->{'Verbose'} |
725
|
0 |
0 |
if $settings->{'Verbose'} |
758
|
0 |
0 |
if (defined $settings->{'LogLevel'} and $settings->{'LogLevel'} eq 'all' || $settings->{'LogLevel'} eq 'commands') |
762
|
0 |
0 |
unless $dont_log |
765
|
0 |
33 |
if ($settings->{'MultiLine'}) |
768
|
0 |
0 |
unless $self->{'current_statement'} =~ /;\s*$/s |
775
|
0 |
33 |
if ($settings->{'EnterWhitespace'}) |
783
|
33 |
0 |
if ($cmd) |
789
|
31 |
328 |
if (@args) |
795
|
22 |
9 |
if ($@) |
804
|
2 |
31 |
unless ($found) |
805
|
0 |
2 |
length $cmd > 20 ? : |
811
|
9 |
24 |
if $cmd =~ /\S/ and $valid |
842
|
0 |
0 |
unless -t $fh |
849
|
0 |
0 |
DBI::looks_like_number($_) ? : |
|
0 |
0 |
defined $_ ? : |
883
|
1 |
0 |
unless -t $fh |
886
|
0 |
1 |
if ($table) |
913
|
18 |
0 |
if (defined $value) { } |
936
|
0 |
0 |
defined $_ ? : |
947
|
0 |
0 |
unless -t $fh |
955
|
0 |
0 |
if ($settings->{'Width'} > length $heading) { } |
958
|
0 |
0 |
defined $record->[$l] ? : |
986
|
0 |
0 |
unless ($sql =~ / /) |
993
|
0 |
0 |
unless my $fh = 'IO::File'->new(">$filename") |
997
|
0 |
0 |
if $delimiter |
1001
|
0 |
0 |
if $@ |
1010
|
0 |
0 |
unless -e $dir |
1038
|
0 |
0 |
if ($settings->{'EscapeStrategy'} eq 'EscapeWhitespace') |
1043
|
0 |
0 |
if ($settings->{'EscapeStrategy'} eq 'ShowWhitespace') { } |
|
0 |
0 |
elsif ($settings->{'EscapeStrategy'} eq 'UriEscape') { } |
1063
|
0 |
0 |
if ($driver eq 'mysql') { } |
1074
|
0 |
0 |
if $settings->{'LogLevel'} eq 'queries' or $settings->{'LogLevel'} eq 'all' |
1080
|
0 |
55 |
if (_is_connected($self->{'dbh'})) { } |
1096
|
0 |
2 |
if (defined $renderer and ref $renderer ne 'CODE') |
1104
|
0 |
111 |
if (defined $_[0] and ref $_[0] and UNIVERSAL::isa($_[0], 'DBI::db') and $_[0]->ping) { } |
1134
|
0 |
0 |
if ($driver eq 'Oracle') { } |
1169
|
0 |
0 |
if defined $precision |
1187
|
0 |
0 |
if ($attrib eq 'TABLE_NAME') { } |
1211
|
0 |
1 |
unless open FH, _expand_filename($filename) |
1224
|
0 |
1 |
scalar @$history >= $max_size ? : |
1228
|
0 |
1 |
unless open FH, '> ' . _expand_filename($filename) |
1239
|
0 |
0 |
if $recoder->getError |
1240
|
0 |
0 |
unless $recoder->recode($_) |
1284
|
18 |
0 |
defined $row->[$_] ? : |
1285
|
2 |
16 |
if $len > $widths[$_] |
1298
|
0 |
0 |
if $len > $width |
1306
|
0 |
3 |
if ($file =~ s[^~([^/]*)][]) |
1308
|
0 |
0 |
$1 ? : |
1336
|
0 |
0 |
unless defined $options |
1344
|
0 |
0 |
defined $params ? : |
1354
|
0 |
0 |
if defined $self->{'sth'} |
1361
|
0 |
0 |
unless $self->{'data'} |
1362
|
0 |
0 |
if $index + 1 > scalar @{$self->{'data'};} |
1364
|
0 |
0 |
if defined $self->{'filter'} |
1372
|
0 |
0 |
unless $self->{'data'} |
1384
|
0 |
0 |
unless $self->{'headers'} |
1391
|
0 |
0 |
if defined $filter |
1407
|
0 |
0 |
if ($self->{'type'} eq 'Array') { } |
1418
|
0 |
0 |
if ($@) |