Condition Coverage

blib/lib/SQL/Translator/Producer/PostgreSQL.pm
Criterion Covered Total %
condition 94 130 72.3


and 3 conditions

line !l l&&!r l&&r condition
322 0 0 0 $basename ne $basename_orig and $critical
496 9 0 1 exists $extra->{'temporary'} and $extra->{'temporary'}
498 9 0 1 exists $extra->{'materialized'} and $extra->{'materialized'}
549 12 86 4 not $attach_comments and my $comments = $field->comments
563 95 5 2 $postgres_version >= "8.003" and $enum_typename
742 18 1 0 $c->type ne "CHECK" and $c->type ne "EXCLUDE"
51 19 0 not @fields and ($c->type ne "CHECK" and $c->type ne "EXCLUDE")
834 0 18 1 defined $size[0] and $size[0] > 11
848 0 12 1 defined $size[0] and $size[0] > 6
854 0 2 15 defined $size[0] and $size[0] > 0
875 60 12 74 defined $size[0] and $size[0] > 0
72 69 5 defined $size[0] and $size[0] > 0 and $data_type =~ /^time/i
60 12 69 defined $size[0] and $size[0] > 0
918 11 6 6 not $to_field->is_nullable and $from_field->is_nullable
923 13 6 4 not $from_field->is_nullable and $to_field->is_nullable
937 22 0 1 $from_enum_typename and $to_enum_typename
22 0 1 $from_enum_typename and $to_enum_typename and $from_enum_typename eq $to_enum_typename
946 1 0 0 not $pg_ver_ok and @add_vals
963 15 4 3 defined $default_value and $to_dt =~ /^(character|text|timestamp|date)/imsx
970 15 5 3 defined $new_default and !defined($old_default) || $old_default ne $new_default
982 8 14 1 not defined $new_default and defined $old_default

or 2 conditions

line l !l condition
308 0 0 shift() || ''
309 0 0 shift() || ''
310 0 0 shift() || ''
311 0 0 shift() || ''
329 0 0 $scope ||= \%global_names
361 22 2 $options->{'no_comments'} || 0
362 20 4 $options->{'add_drop_table'} || 0
363 0 24 $options->{'postgres_version'} || 0
364 22 2 $options->{'type_defs'} || {}
476 2 8 $options->{'postgres_version'} || 0
540 74 28 $options->{'constraint_defs'} || []
541 7 95 $options->{'postgres_version'} || 0
542 76 26 $options->{'type_defs'} || {}
545 88 14 $field_name_scope{$table_name} ||= {}
664 1 17 $options->{'postgres_version'} || 0
671 18 0 $index->type || 'NORMAL'
716 0 70 $options->{'postgres_version'} || 0
736 43 27 $c->name || ''
745 0 70 $constraint_extras{'include'} || ''
781 1 0 $constraint_extras{'using'} || ''
783 1 0 $constraint_extras{'where'} || ''
799 2 12 $trigger->scope || ''
945 1 0 $options->{'postgres_version'} || 0

or 3 conditions

line l !l&&r !l&&!r condition
127 80 6 0 $quoting_generator ||= "SQL::Translator::Generator::DDL::PostgreSQL"->new
244 2 0 normalize_quote_options($options) ? $quoting_generator ||= "SQL::Translator::Generator::DDL::PostgreSQL"->new : $nonquoting_generator ||= "SQL::Translator::Generator::DDL::PostgreSQL"->new("quote_chars", [])
669 18 0 0 $index->name || join('_', $table_name, 'idx', ++$index_name{$table_name})
834 1 1 17 defined $size[0] and $size[0] > 11 or $data_type eq "bigint"
847 12 1 133 $data_type =~ /^time/i or $data_type =~ /^interval/i
970 3 2 3 !defined($old_default) || $old_default ne $new_default
1144 13 1 0 @{$defs;} or @{$fks;}