Branch Coverage

blib/lib/DBD/PgLite/MirrorPgToSQLite.pm
Criterion Covered Total %
branch 0 138 0.0


line true false branch
17 0 0 if exists $opt{$_}
22 0 0 if ($opt{'where'} and not $opt{'where'} =~ /^\s*where\s/i and not $opt{'where'} =~ /^\s*(?:natural\s+)?join\s/i)
27 0 0 if $opt{'append'} and $opt{'snapshot'}
28 0 0 unless $opt{'pg_dbh'} or $opt{'pg_dsn'}
30 0 0 unless ($opt{'pg_dbh'})
32 0 0 unless $opt{'pg_dbh'} = 'DBI'->connect(@opt{'pg_dsn', 'pg_user', 'pg_pass'}, {'RaiseError', 1})
36 0 0 unless @{$opt{'tables'};} and $fn
37 0 0 if $opt{'verbose'}
40 0 0 if (-f "$fn.tmp")
42 0 0 unless unlink "$fn.tmp"
44 0 0 if ($opt{'append'})
45 0 0 unless (copy($fn, "$fn.tmp"))
53 0 0 if $opt{'verbose'}
55 0 0 if grep {m[^/.+/$];} @{$opt{'views'};}
58 0 0 if ($opt{'snapshot'}) { }
62 0 0 if $opt{'functions'}
66 0 0 if $opt{'functions'}
68 0 0 if (@views)
69 0 0 if $opt{'verbose'}
72 0 0 if $opt{'verbose'}
75 0 0 if ($@)
80 0 0 if $disconnect
83 0 0 if (-f $fn)
84 0 0 unless copy($fn, "$fn.bak")
86 0 0 unless move("$fn.tmp", $fn)
96 0 0 unless $list
97 0 0 unless ref $list
103 0 0 $ENV{'PGDATABASE'} ? :
121 0 0 if $defaults{'pg_user'}
128 0 0 if $opt{'verbose'}
131 0 0 if ($opt{'append'})
133 0 0 if $drop
138 0 0 if ($pages > $opt{'page_limit'}) { }
139 0 0 if $opt{'verbose'}
141 0 0 if $opt{'verbose'}
142 0 0 if (@pkey) { }
163 0 0 if (@$res and scalar @{$$res[0];} != $colcnt)
172 0 0 if $opt{'indexes'}
173 0 0 if $drop
178 0 0 unless ($opt{'sl_dbh'}->selectrow_array(q[select name from sqlite_master where name = 'pglite_functions' and type = 'table']))
184 0 0 if $opt{'verbose'}
185 0 0 unless ref $fun eq 'ARRAY' and @$fun
188 0 0 unless ($opt{'sl_dbh'}->selectrow_array('select name from pglite_functions where name = ? and argnum = ?', {}, $name, $argnum))
189 0 0 if $opt{'verbose'}
200 0 0 if /\(oid\)/
201 0 0 if /_pkey\b/
204 0 0 if $opt{'verbose'}
207 0 0 if ($@ =~ /unique/i and s/ UNIQUE / /)
208 0 0 if $opt{'verbose'}
218 0 0 if $opt{'verbose'}
220 0 0 if ($opt{'sl_dbh'}->selectrow_array(q[select name from sqlite_master where name = ? and type = 'view'], {}, $vn))
224 0 0 if $@
231 0 0 if ($pat =~ s[^/(.+)/$][$1]) { }
245 0 0 if ($pat =~ s[^/(.+)/$][$1]) { }
261 0 0 if @cached
265 0 0 if @pknames and $pknames[0] ne ''
273 0 0 $opt{'pg_dbh'}{'mbl_dbh'} ? :
276 0 0 unless (-d $opt{'cachedir'})
281 0 0 unless -d "$opt{'cachedir'}/$uid"
283 0 0 if ($cnt) { }
0 0 elsif (-f $fn and time - (stat $fn)[9] < 604800) { }
301 0 0 $nullable ? :
310 0 0 if ($action eq 'create') { }
0 0 elsif ($action eq 'clear') { }
311 0 0 if -f $lockfile
312 0 0 unless open LOCK, '>', "$lockfile"
316 0 0 if (-f $lockfile) { }
317 0 0 unless unlink $lockfile
319 0 0 unless -f $lockfile