line |
true |
false |
branch |
32
|
0 |
0 |
if $drh |
34
|
0 |
0 |
if (not $methods_are_installed and 1) |
94
|
0 |
0 |
if ($dbname =~ /=/) |
97
|
0 |
0 |
if ($key =~ /^(?:db(?:name)?|database)$/) { } |
|
0 |
0 |
elsif ($key eq 'uri') { } |
108
|
0 |
0 |
if (my $flags = $attr->{'sqlite_open_flags'}) |
109
|
0 |
0 |
unless ($flags & (DBD::SQLcipher::OPEN_READONLY() | DBD::SQLcipher::OPEN_READWRITE())) |
116
|
0 |
0 |
if ($^O =~ /MSWin32/ and $real ne ':memory:' and $real ne '' and not $real =~ /^file:/ and not -f $real) |
121
|
0 |
0 |
if (-d $dir) { } |
131
|
0 |
0 |
unless DBD::SQLcipher::db::_login($dbh, $real, $user, $auth, $attr) |
170
|
0 |
0 |
unless ($collation) |
171
|
0 |
0 |
if $dbh->{'PrintWarn'} |
186
|
0 |
0 |
unless defined $_[0] and defined $_[1] |
196
|
0 |
0 |
unless defined $sql |
202
|
0 |
0 |
unless DBD::SQLcipher::st::_prepare($sth, $sql, @_) |
212
|
0 |
0 |
if (defined $statement and not defined $attr and not @bind_values) |
216
|
0 |
0 |
if (index($statement, ';') == -1 or $allow_multiple_statements) |
225
|
0 |
0 |
unless my $sth = $dbh->prepare($statement, $attr) |
226
|
0 |
0 |
unless $sth->execute(splice(@copy, 0, $sth->{'NUM_OF_PARAMS'})) |
229
|
0 |
0 |
unless $allow_multiple_statements |
234
|
0 |
0 |
$rows == 0 ? : |
244
|
0 |
0 |
if $file and not -f $file |
245
|
0 |
0 |
$dbh->FETCH('Active') ? : |
261
|
0 |
0 |
if ref $v eq 'CODE' |
269
|
0 |
0 |
unless my $sth_databases = $dbh->prepare('PRAGMA database_list') |
270
|
0 |
0 |
unless $sth_databases->execute |
272
|
0 |
0 |
if $db_info->{'seq'} >= 2 |
285
|
0 |
0 |
if (defined $cat_val and $cat_val eq '%' and defined $sch_val and $sch_val eq '' and defined $tbl_val and $tbl_val eq '') { } |
|
0 |
0 |
elsif (defined $cat_val and $cat_val eq '' and defined $sch_val and $sch_val eq '%' and defined $tbl_val and $tbl_val eq '') { } |
|
0 |
0 |
elsif (defined $cat_val and $cat_val eq '' and defined $sch_val and $sch_val eq '' and defined $tbl_val and $tbl_val eq '' and defined $typ_val and $typ_val eq '%') { } |
368
|
0 |
0 |
unless ref $attr eq 'HASH' |
369
|
0 |
0 |
defined $attr->{'Escape'} ? : |
370
|
0 |
0 |
if (defined $sch_val) |
373
|
0 |
0 |
if (defined $tbl_val) |
376
|
0 |
0 |
if (defined $typ_val) |
382
|
0 |
0 |
unless ($table_type =~ /^'.*'$/) |
387
|
0 |
0 |
if $table_type_list |
389
|
0 |
0 |
if @where |
392
|
0 |
0 |
unless my $sth = $dbh->prepare($sql) |
393
|
0 |
0 |
unless $sth->execute |
405
|
0 |
0 |
if defined $schema and $schema ne '%' and $schema ne $dbname |
409
|
0 |
0 |
$dbname eq 'temp' ? : |
|
0 |
0 |
$dbname eq 'main' ? : |
414
|
0 |
0 |
unless my $sth = $dbh->prepare("SELECT name, sql FROM $master_table WHERE type = ?") |
415
|
0 |
0 |
unless $sth->execute('table') |
418
|
0 |
0 |
if defined $table and $table ne '%' and $table ne $tbname |
421
|
0 |
0 |
unless my $t_sth = $dbh->prepare("PRAGMA $quoted_dbname.table_info($quoted_tbname)") |
422
|
0 |
0 |
unless $t_sth->execute |
425
|
0 |
0 |
if $col->{'pk'} |
432
|
0 |
0 |
if (@pk > 1 and $row->{'sql'} =~ /\bPRIMARY\s+KEY\s*\(\s*
(
(?:
(
[a-z_][a-z0-9_]*
| (["'`])(?:\3\3|(?!\3).)+?\3(?!\3)
| \[[^\]]+\]
)
\s*,\s*
)+
(
[a-z_][a-z0-9_]*
| (["'`])(?:\5\5|(?!\5).)+?\5(?!\5)
| \[[^\]]+\]
)
)
\s*\)/six) |
460
|
0 |
0 |
if (defined $quote) { } |
|
0 |
0 |
elsif (defined $brack) { } |
472
|
0 |
0 |
$row->{'sql'} =~ /\bCONSTRAINT\s+(\S+|"[^"]+")\s+PRIMARY\s+KEY\s*\(/i ? : |
486
|
0 |
0 |
unless my $sponge = 'DBI'->connect('DBI:Sponge:', '', '') |
490
|
0 |
0 |
unless my $sth = $sponge->prepare('primary_key_info', {'rows', [map({[@{$_;}{@names}];} @pk_info)], 'NUM_OF_FIELDS', scalar @names, 'NAME', \@names}) |
559
|
0 |
0 |
unless my $databases = $dbh->selectall_arrayref('PRAGMA database_list', {'Slice', {}}) |
565
|
0 |
0 |
if defined $fk_schema and $fk_schema ne '%' and $fk_schema ne $dbname |
568
|
0 |
0 |
$dbname eq 'temp' ? : |
|
0 |
0 |
$dbname eq 'main' ? : |
573
|
0 |
0 |
unless my $tables = $dbh->selectall_arrayref("SELECT name FROM $master_table WHERE type = ?", undef, 'table') |
576
|
0 |
0 |
if defined $fk_table and $fk_table ne '%' and $fk_table ne $tbname |
579
|
0 |
0 |
unless my $sth = $dbh->prepare("PRAGMA $quoted_dbname.foreign_key_list($quoted_tbname)") |
580
|
0 |
0 |
unless $sth->execute |
582
|
0 |
0 |
if defined $pk_table and $pk_table ne '%' and $pk_table ne $row->{'table'} |
584
|
0 |
0 |
unless ($table_info{$row->{'table'}}) |
588
|
0 |
0 |
unless my $t_sth = $dbh->prepare("PRAGMA $quoted_db.table_info($quoted_tb)") |
589
|
0 |
0 |
unless $t_sth->execute |
594
|
0 |
0 |
if (keys %$cols) |
604
|
0 |
0 |
if defined $pk_schema and $pk_schema ne '%' and $pk_schema ne $table_info{$row->{'table'}}{'schema'} |
621
|
0 |
0 |
$table_info{$row->{'table'}}{'columns'}{$row->{'to'}} ? : |
627
|
0 |
0 |
unless my $sponge_dbh = 'DBI'->connect('DBI:Sponge:', '', '') |
631
|
0 |
0 |
unless my $sponge_sth = $sponge_dbh->prepare('foreign_key_info', {'NAME', \@FOREIGN_KEY_INFO_ODBC, 'rows', [map({[@{$_;}{@FOREIGN_KEY_INFO_ODBC}];} @fk_info)], 'NUM_OF_FIELDS', scalar @FOREIGN_KEY_INFO_ODBC}) |
659
|
0 |
0 |
unless my $databases = $dbh->selectall_arrayref('PRAGMA database_list', {'Slice', {}}) |
664
|
0 |
0 |
if defined $schema and $schema ne '%' and $schema ne $dbname |
667
|
0 |
0 |
$dbname eq 'temp' ? : |
|
0 |
0 |
$dbname eq 'main' ? : |
672
|
0 |
0 |
unless my $tables = $dbh->selectall_arrayref("SELECT name FROM $master_table WHERE type = ?", undef, 'table') |
675
|
0 |
0 |
if defined $table and $table ne '%' and uc $table ne uc $tbname |
678
|
0 |
0 |
unless my $sth = $dbh->prepare("PRAGMA $quoted_dbname.index_list($quoted_tbname)") |
679
|
0 |
0 |
unless $sth->execute |
682
|
0 |
0 |
if $unique_only and not $row->{'unique'} |
686
|
0 |
0 |
unless my $i_sth = $dbh->prepare("PRAGMA $quoted_db.index_info($quoted_idx)") |
687
|
0 |
0 |
unless $i_sth->execute |
700
|
0 |
0 |
$row->{'unique'} ? : |
711
|
0 |
0 |
unless my $sponge_dbh = 'DBI'->connect('DBI:Sponge:', '', '') |
715
|
0 |
0 |
unless my $sponge_sth = $sponge_dbh->prepare('statistics_info', {'NAME', \@STATISTICS_INFO_ODBC, 'rows', [map({[@{$_;}{@STATISTICS_INFO_ODBC}];} @statistics_info)], 'NUM_OF_FIELDS', scalar @STATISTICS_INFO_ODBC}) |
789
|
0 |
0 |
if (defined $col_val and $col_val eq '%') |
824
|
0 |
0 |
if (defined $sch_val) |
827
|
0 |
0 |
if (defined $tbl_val) |
830
|
0 |
0 |
if @where |
832
|
0 |
0 |
unless my $sth_tables = $dbh->prepare($sql) |
833
|
0 |
0 |
unless $sth_tables->execute |
838
|
0 |
0 |
unless my $sth_columns = $dbh->prepare(qq[PRAGMA "$schema".table_info("$table")]) |
839
|
0 |
0 |
unless $sth_columns->execute |
842
|
0 |
0 |
if (defined $col_val) |
844
|
0 |
0 |
unless my $sth = $dbh->prepare("SELECT '$col_info->{'name'}' LIKE '${col_val}'") |
845
|
0 |
0 |
unless $sth->execute |
847
|
0 |
0 |
unless ($sth->fetchrow_array)[0] |
858
|
0 |
0 |
if ($type =~ s/(\w+)\s*\(\s*(\d+)(?:\s*,\s*(\d+))?\s*\)/$1/) |
865
|
0 |
0 |
if (defined $col_info->{'dflt_value'}) |
869
|
0 |
0 |
if ($col_info->{'notnull'}) { } |
883
|
0 |
0 |
unless my $sponge = 'DBI'->connect('DBI:Sponge:', '', '') |
886
|
0 |
0 |
unless $sponge->prepare('column_info', {'rows', [map({[@{$_;}{@COLUMN_INFO}];} @cols)], 'NUM_OF_FIELDS', scalar @COLUMN_INFO, 'NAME', [@COLUMN_INFO]}) |
911
|
0 |
0 |
if exists $_[0]{$_[1]} |