Branch Coverage

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


line true false branch
1062 2 2 unless defined $main::RD_ERRORS
1064 2 2 unless defined $main::RD_WARN
1066 4 0 unless defined $main::RD_HINT
1069 0 4 $translator->trace ? :
1075 0 4 unless defined $result
1076 0 4 if $DEBUG
1087 0 19 unless my $table = $schema->add_table("name", $tdata->{'table_name'})
1090 2 17 if $tdata->{'temporary'}
1099 1 85 if $fdata->{'drop'}
1107 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'})
1110 1 84 if $fdata->{'is_primary_key'}
1113 33 1 unless $cdata->{'type'} eq "foreign_key"
1119 12 7 unless $tdata->{'indices'}
1121 3 13 if $idata->{'method'}
1122 2 14 if $idata->{'where'}
1124 1 15 if $idata->{'include'}
1128 0 16 unless my $index = $table->add_index("name", $idata->{'name'}, "type", uc $idata->{'type'}, "fields", $idata->{'fields'}, "options", \@options)
1133 3 16 unless $tdata->{'constraints'}
1153 0 73 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'}, "options", $options)
1169 1 3 if $vinfo->{'is_temporary'}