Branch Coverage

blib/lib/SQL/Translator/Parser/PostgreSQL.pm
Criterion Covered Total %
branch 32 40 80.0


line true false branch
1051 2 2 unless defined $main::RD_ERRORS
1052 2 2 unless defined $main::RD_WARN
1053 4 0 unless defined $main::RD_HINT
1055 0 4 $translator->trace ? :
1061 0 4 unless defined $result
1062 0 4 if $DEBUG
1073 0 19 unless my $table = $schema->add_table("name", $tdata->{'table_name'})
1076 2 17 if $tdata->{'temporary'}
1088 1 85 if $fdata->{'drop'}
1096 0 85 unless my $field = $table->add_field("name", $fdata->{'name'}, "data_type", $fdata->{'data_type'}, "size", $fdata->{'size'}, "default_value", $fdata->{'default'}, "is_auto_increment", $fdata->{'is_auto_increment'}, "is_nullable", $fdata->{'is_nullable'}, "comments", $fdata->{'comments'})
1099 1 84 if $fdata->{'is_primary_key'}
1102 33 1 unless $cdata->{'type'} eq "foreign_key"
1108 12 7 unless $tdata->{'indices'}
1110 3 13 if $idata->{'method'}
1111 2 14 if $idata->{'where'}
1112 1 15 if $idata->{'include'}
1116 0 16 unless my $index = $table->add_index("name", $idata->{'name'}, "type", uc $idata->{'type'}, "fields", $idata->{'fields'}, "options", \@options)
1121 3 16 unless $tdata->{'constraints'}
1133 0 72 unless my $constraint = $table->add_constraint("name", $cdata->{'name'}, "type", $cdata->{'type'}, "fields", $cdata->{'fields'}, "reference_table", $cdata->{'reference_table'}, "reference_fields", $cdata->{'reference_fields'}, "match_type", $cdata->{'match_type'} || '', "on_delete", $cdata->{'on_delete'} || $cdata->{'on_delete_do'}, "on_update", $cdata->{'on_update'} || $cdata->{'on_update_do'}, "expression", $cdata->{'expression'})
1147 1 3 if $vinfo->{'is_temporary'}