Branch Coverage

blib/lib/Data/HandyGen/mysql.pm
Criterion Covered Total %
branch 38 134 28.3


line true false branch
335 0 0 if $table_valspec
348 0 0 if $tmpl_valspec
372 0 0 if ($table_def->is_pk($col) and defined $real_id)
377 0 0 unless my $col_def = $table_def->column_def($col)
382 0 0 if ($self->fk)
383 0 0 if (my $referenced_table_col = $table_def->is_fk($col))
384 0 0 if (ref $referenced_table_col eq 'HASH') { }
394 0 0 if (not defined $value and defined(my $valspec_col = $self->_valspec->{$table}{$col}))
399 0 0 if (not defined $value and defined $col_def->column_default)
404 0 0 unless (defined $value)
410 0 0 unless ($func)
421 0 0 if ($table_def->is_pk($col))
434 0 0 if ($@)
442 0 0 if (@{$table_def->pk_columns;} == 1)
456 8 47 if (defined $_valspec)
457 5 3 if (ref $_valspec eq 'HASH') { }
474 1 6 unless $table
475 1 5 unless defined $id
487 3 18 unless ref $valspec_col eq 'HASH'
492 13 5 if (exists $valspec_col->{'random'}) { }
4 1 elsif (exists $valspec_col->{'fixval'}) { }
0 1 elsif (exists $valspec_col->{'any'}) { }
0 1 elsif (exists $valspec_col->{'range'}) { }
0 1 elsif (exists $valspec_col->{'dt_range'}) { }
495 9 4 if (ref $values eq 'ARRAY') { }
1 3 elsif (ref $values eq 'Regexp') { }
496 1 8 if (scalar @$values == 0)
515 2 2 unless ref $fixval eq ''
526 0 0 unless ref $spec eq 'ARRAY' and @$spec == 2
532 0 0 unless ref $spec eq 'ARRAY' and @$spec == 2
587 0 0 unless defined $table and defined $col and defined $value
608 0 0 unless $table and $col and $ref_table and $ref_col
613 0 0 if (my $valspec_col = $self->_valspec->{$table}{$col} || $self->_valspec->{$ref_table}{$ref_col}) { }
0 0 elsif (defined(my $column_default = $self->_table_def($table)->column_def($col)->column_default)) { }
655 0 0 if (@_ref_ids) { }
697 0 0 if ($self->_valspec->{$table} and defined $self->_valspec->{$table}{$col} and defined($real_id = $self->determine_value($self->_valspec->{$table}{$col}))) { }
712 0 0 if ($col_def->is_auto_increment) { }
726 0 0 unless my $func = $VALUE_DEF_FUNC{$type}
752 0 0 if (defined $self->_valspec->{$table}{$col}) { }
761 0 0 if ($col_def->is_auto_increment)
776 0 0 if (defined $col_def->column_default and not $table_def->is_fk($col))
782 0 0 if ($col_def->is_nullable eq 'YES')
793 0 0 wantarray ? :
821 0 0 if (defined $exp_id)
826 0 0 if ($colname_length + $pk_length + 1 <= $maxlen) { }
0 0 elsif ($pk_length + 1 <= $maxlen) { }
0 0 elsif ($pk_length == $maxlen) { }
838 0 0 if $maxlen > $LENGTH_LIMIT_VARCHAR
858 0 0 ($type || '') =~ /unsigned/ ? :
867 0 0 ($type || '') =~ /unsigned/ ? :
875 0 0 ($type || '') =~ /unsigned/ ? :
884 0 0 if ($num =~ /^0+$/) { }
891 0 0 if ($scale > 0)
895 0 0 if ($frac =~ /^0+$/) { }
934 0 0 if ($col_def->data_type eq 'date') { }
1011 1 16 unless defined $table and length $table > 0
1014 2 14 unless defined $table_valspec and ref $table_valspec eq 'HASH'
1023 5 9 if ($col =~ /\./)
1027 1 2 unless defined $_table and length $_table > 0 and defined $_col and length $_col > 0 and @_dummy == 0
1038 5 6 if (ref $val eq 'ARRAY' or ref $val eq 'Regexp') { }
0 6 elsif (ref $val eq 'HASH') { }
0 6 elsif (ref $val eq 'SCALAR' and $$val eq 'any') { }
6 0 elsif (ref $val eq '') { }
1103 0 0 if ($fk_check eq 'ON' or $fk_check == 1)
1117 0 0 if ($fk_check eq 'ON' or $fk_check == 1)
1140 0 0 if (0 == $self->_value_exists_in_table_col($table, $col, $value))
1151 0 0 if ($self->debug)