Branch Coverage

blib/lib/SQL/Translator/Parser/PostgreSQL.pm
Criterion Covered Total %
branch 29 38 76.3


line true false branch
1030 2 1 unless defined $main::RD_ERRORS
1031 2 1 unless defined $main::RD_WARN
1032 3 0 unless defined $main::RD_HINT
1034 0 3 $translator->trace ? :
1040 0 3 unless defined $result
1041 0 3 if $DEBUG
1052 0 15 unless my $table = $schema->add_table('name', $tdata->{'table_name'})
1055 2 13 if $tdata->{'temporary'}
1067 1 71 if $fdata->{'drop'}
1075 0 71 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'})
1078 1 70 if $fdata->{'is_primary_key'}
1081 28 1 unless $cdata->{'type'} eq 'foreign_key'
1087 9 6 unless $tdata->{'indices'}
1089 2 12 if $idata->{'method'}
1090 1 13 if $idata->{'where'}
1094 0 14 unless my $index = $table->add_index('name', $idata->{'name'}, 'type', uc $idata->{'type'}, 'fields', $idata->{'fields'}, 'options', \@options)
1099 3 12 unless $tdata->{'constraints'}
1111 0 62 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'})
1125 0 1 if $vinfo->{'is_temporary'}