Branch Coverage

blib/lib/DBIx/OnlineDDL.pm
Criterion Covered Total %
branch 47 140 33.5


line true false branch
450 0 13 unless @ids
451 0 13 if @ids > 1
458 27 0 if ($rsrc) { }
482 27 0 unless $copy_opts->{'progress_bar'}
585 0 28 unless Class::Load::load_optional_class($helper_class)
630 28 0 if ($rsrc) { }
645 0 0 do { $ref eq 'CODE' } ? :
0 0 do { $ref eq 'ARRAY' } ? :
0 0 do { not $ref } ? :
0 28 $on_connect_call ? :
664 0 0 if ($first_occ and ref $first_occ and ref $first_occ eq 'ARRAY') { }
689 0 0 unless $dbi_attrs
700 0 0 do { subname($callbacks->{'connected'}) =~ /^$package_re/ } ? :
0 0 do { $ref ne 'CODE' unless not $ref } ? :
0 0 $callbacks->{'connected'} ? :
706 0 0 unless not $ref
727 0 0 if $conn->max_attempts == 10
818 40 15 unless $hooks and $hooks->{$hook_name}
875 3 0 if ($is_retryable)
880 3 0 if $progress
886 0 3 if ($failed >= $max / 2)
888 0 0 if ($runner->isa('DBIx::Class::Storage::BlockRunner')) { }
896 3 0 if $progress
908 0 1209 unless $method =~ /^(?:txn|run)$/
911 1209 0 if (my $rsrc = $self->rsrc) { }
922 27 1182 $method eq 'txn' ? :
942 167 720 do { $wantarray } ? :
887 322 defined $wantarray ? :
951 0 1209 if (my $err = $@) { }
953 0 0 if $err =~ /Reached max_attempts amount of / or $block_runner->failed_attempt_count >= $block_runner->max_attempts
958 0 0 unless $self->_retry_handler($block_runner)
967 0 0 do { $wantarray } ? :
0 0 defined $wantarray ? :
972 167 1042 $wantarray ? :
999 0 184 if $ref and $ref ne "ARRAY"
1002 0 184 $ref ? :
1041 0 28 unless $table_sql
1043 0 28 if $helper->dbms_uses_global_fk_namespace
1121 0 64 unless @unique_cols
1124 0 64 unless &all(sub { $column_set{$_}; } , @unique_cols)
1129 0 28 unless @unique_ids
1133 1 27 if $helper->has_conflicting_triggers_on_table($orig_table_name)
1217 27 54 if ($trigger_type eq 'INSERT') { }
27 27 elsif ($trigger_type eq 'UPDATE') { }
27 0 elsif ($trigger_type eq 'DELETE') { }
1297 0 27 if ($helper->dbms_uses_global_fk_namespace or $helper->child_fks_need_adjusting)
1313 0 0 if ($dbh->can("statistics_info") and %$fk_hash)
1316 0 0 if defined $_ and $_ ne $orig_table_name
1383 0 27 if ($helper->child_fks_need_adjusting)
1421 0 27 if ($helper->dbms_uses_global_fk_namespace)
1432 0 27 if ($helper->child_fks_need_adjusting)
1481 0 139 if @results
1488 0 139 unless defined $new_name
1539 0 28 unless @{$idxs{'PRIMARY'}{'columns'};}
1541 0 28 unless $self->dbh->can("statistics_info")
1550 0 28 if $@
1582 0 0 unless $DBIx::OnlineDDL::a->{'FK_NAME'} cmp $DBIx::OnlineDDL::b->{'FK_NAME'}
1587 0 0 unless $row->{'PKTABLE_NAME'} or $row->{'UK_TABLE_CAT'}
1588 0 0 unless $row->{'FKTABLE_NAME'} or $row->{'FK_TABLE_NAME'}
1600 0 0 if ($fks{$key}) { }
1621 0 0 if ($create_table_sql =~ m[ CONSTRAINT \s $fk_name_quote_re \s ( # start capture of full SQL FOREIGN \s KEY \s \( [^\)]+ \) \s # "FOREIGN KEY" plus column list (which we already have above) REFERENCES \s [^\(]+ \s \( [^\)]+ \) # "REFERENCES" plus table+column list (again, already captured above) \s? ( [^\)\,]* ) # ON DELETE/UPDATE, DEFER, MATCH, etc. ) # end capture of full SQL ]six)
1632 0 0 if $extra_sql =~ /ON DELETE ((?:SET |NO )?\w+)/i
1633 0 0 if $extra_sql =~ /ON UPDATE ((?:SET |NO )?\w+)/i
1634 0 0 if $extra_sql =~ /((?:NOT )?DEFERRABLE(?: INITIALLY \w+)?)/i
1635 0 0 if $extra_sql =~ /(MATCH \w+)/i
1653 0 0 if ($fk->{'fk_sql'})
1671 0 0 $fk->{'match'} ? :
0 0 $fk->{'delete_rule'} ? :
0 0 $fk->{'update_rule'} ? :
0 0 $fk->{'defer'} ? :