Branch Coverage

blib/lib/SQL/Translator/Schema.pm
Criterion Covered Total %
branch 76 120 63.3


line true false branch
73 0 0 if ($field->is_foreign_key)
107 19 302 if (UNIVERSAL::isa($_[0], $table_class)) { }
112 0 302 ref $_[0] eq 'HASH' ? :
114 1 301 unless $table = $table_class->new(\%args)
123 1 319 if (defined $self->_tables->{$table_name}) { }
153 2 3 if (UNIVERSAL::isa($_[0], $table_class)) { }
162 1 4 unless (exists $self->_tables->{$table_name})
168 2 2 if ($cascade)
200 2 17 if (UNIVERSAL::isa($_[0], $procedure_class)) { }
205 0 17 ref $_[0] eq 'HASH' ? :
207 0 17 unless $args{'name'}
208 0 17 unless $procedure = $procedure_class->new(\%args)
213 0 19 unless my $procedure_name = $procedure->name
216 0 19 if (defined $self->_procedures->{$procedure_name}) { }
246 1 2 if (UNIVERSAL::isa($_[0], $proc_class)) { }
253 1 2 unless (exists $self->_procedures->{$proc_name})
286 2 44 if (UNIVERSAL::isa($_[0], $trigger_class)) { }
291 0 44 ref $_[0] eq 'HASH' ? :
293 0 44 unless $args{'name'}
294 0 44 unless $trigger = $trigger_class->new(\%args)
300 0 46 unless my $trigger_name = $trigger->name
301 0 46 if (defined $self->_triggers->{$trigger_name}) { }
329 1 2 if (UNIVERSAL::isa($_[0], $trigger_class)) { }
336 1 2 unless (exists $self->_triggers->{$trigger_name})
369 3 25 if (UNIVERSAL::isa($_[0], $view_class)) { }
374 0 25 ref $_[0] eq 'HASH' ? :
376 0 25 unless $args{'name'}
377 0 25 unless $view = $view_class->new(\%args)
381 0 28 unless my $view_name = $view->name
383 1 27 if (defined $self->_views->{$view_name}) { }
411 1 2 if (UNIVERSAL::isa($_[0], $view_class)) { }
418 1 2 unless (exists $self->_views->{$view_name})
451 1 15 unless $self->get_tables
454 0 59 unless $object->is_valid
473 0 1 unless my $procedure_name = shift()
475 0 1 unless exists $self->_procedures->{$procedure_name}
497 8 10 if (@procedures) { }
498 8 0 wantarray ? :
519 1 392 unless my $table_name = shift()
521 0 392 if ($case_insensitive)
524 0 0 if $table_name eq uc $table
529 47 345 unless exists $self->_tables->{$table_name}
551 244 3 if (@tables) { }
552 229 15 wantarray ? :
573 0 2 unless my $trigger_name = shift()
575 0 2 unless exists $self->_triggers->{$trigger_name}
597 14 15 if (@triggers) { }
598 14 0 wantarray ? :
619 1 3 unless my $view_name = shift()
621 1 2 unless exists $self->_views->{$view_name}
643 22 34 if (@views) { }
644 22 0 wantarray ? :
690 0 0 unless my $field_name = $field->name
691 0 0 if $skip_fields{$field_name}
692 0 0 if $field->is_primary_key
698 0 0 if $join_pk_only and not defined $pk{$field}
701 0 0 unless scalar @table_names > 1
704 0 0 unless my $table1 = $self->get_table($table_names[$i])
707 0 0 unless my $table2 = $self->get_table($table_names[$j])
708 0 0 if $table1->name eq $table2->name