Branch Coverage

blib/lib/SQL/Translator/Producer/SQLite.pm
Criterion Covered Total %
branch 70 94 74.4


line true false branch
41 189 179 $NO_QUOTES ? :
66 5 5 if $translator->quote_identifiers and $translator->quote_identifiers ne '0E0'
70 1 9 unless $no_comments
74 8 2 unless $no_txn
96 8 2 unless $no_txn
98 3 7 if (wantarray) { }
113 5 23 if (my $prev = $scope->{$name})
116 0 5 if length $name > $max_id_length
119 0 5 if $WARN
141 4 4 if $add_drop_view
144 2 0 if exists $extra->{'temporary'} and $extra->{'temporary'}
146 2 0 if exists $extra->{'if_not_exists'} and $extra->{'if_not_exists'}
149 8 0 if (my $sql = $view->sql)
155 0 8 unless ($options->{'no_comments'})
177 0 29 unless my(@fields) = $table->get_fields
179 3 26 $options->{'temporary_table'} ? :
183 0 29 $sqlite_version >= 3.003 ? :
186 1 28 unless $no_comments
187 12 17 if ($add_drop_table) { }
198 0 29 if ($table->comments and not $no_comments)
208 20 9 $pk ? :
218 2 27 if (scalar @pk_fields > 1 or @pk_fields and not grep(/INTEGER PRIMARY KEY/, @field_defs))
237 10 31 if ($c->type eq 'FOREIGN KEY') { }
0 31 elsif ($c->type eq 'CHECK') { }
243 30 11 unless $c->type eq 'UNIQUE'
255 1 0 if $c->name
264 0 11 unless $_
265 0 11 unless (@rfields)
267 0 0 if (my $ref_table = $c->schema->get_table($rtable_name)) { }
270 0 0 unless @rfields
284 1 10 if $c->{'on_delete'}
285 1 10 if $c->{'on_update'}
299 3 10 $index->type eq 'UNIQUE' ? :
304 0 13 if $WARN
320 0 15 if $WARN
342 6 10 if (@$events > 1)
345 0 6 if $WARN
350 14 2 if $add_drop
355 12 4 if (not ref $trigger->action) { }
357 11 1 unless $action =~ /^ \s* BEGIN [\s\;] .*? [\s\;] END [\s\;]* $/six
362 0 4 if $trigger->action->{'for_each'}
365 0 4 if $trigger->action->{'when'}
406 2 1 if $constraint->type eq 'UNIQUE'
448 2 2 if (@{$diffs->{'rename_field'};} == 0 and @{$diffs->{'alter_field'};} == 0 and @{$diffs->{'drop_field'};} == 0)
462 0 3 if ($diffs->{'rename_table'} and @{$diffs->{'rename_table'};})
498 1 10 $rename_field{$_} ? :
524 3 0 wantarray ? :