line |
true |
false |
branch |
48
|
2 |
221 |
unless defined $namespace |
49
|
3 |
218 |
if ref $namespace |
51
|
13 |
205 |
if $namespace eq '' and $allow_empty_string |
59
|
76 |
13 |
unless (ref $namespaces) |
63
|
2 |
11 |
if 'ARRAY' ne ref $namespaces |
66
|
4 |
16 |
unless _check_namespace($namespace) |
117
|
0 |
31 |
unless $parser->views |
131
|
27 |
62 |
if ($self->uppercase) |
136
|
86 |
3 |
if $self->output_path |
147
|
63 |
26 |
unless -f $path |
173
|
118 |
4 |
if $self->output_path |
178
|
34 |
88 |
unless (-e $dir) |
179
|
1 |
33 |
unless make_path($dir) |
182
|
120 |
1 |
if (open my $fh, '>', $dir . '/' . $file . '.pm') { } |
183
|
4 |
116 |
if ($self->utf8) |
202
|
0 |
54 |
if (defined $self->remove_table_prefix) |
211
|
1 |
53 |
unless $rels |
237
|
0 |
54 |
if (defined $self->remove_table_prefix) |
246
|
1 |
53 |
unless $rels |
271
|
1 |
203 |
if (defined $self->remove_table_prefix) |
276
|
63 |
141 |
if ($self->uppercase) |
280
|
194 |
10 |
$self->namespace ? : |
|
28 |
176 |
length $self->result_namespace ? : |
308
|
7 |
84 |
if (not ref $data or 'HASH' ne ref $data) { } |
|
3 |
81 |
elsif ($data->{'comment'}) { } |
310
|
4 |
3 |
if $comment |
316
|
7 |
84 |
if ($table_comment_perl) |
320
|
2 |
89 |
$self->inherit_from_core ? : |
321
|
87 |
4 |
unless $data->{'components'} |
322
|
90 |
1 |
$components ? : |
340
|
54 |
37 |
if (not $self->column_details) { } |
356
|
2 |
89 |
$self->inherit_from_core ? : |
357
|
3 |
88 |
$self->utf8 ? : |
407
|
0 |
2 |
if (not ref $data or 'HASH' ne ref $data) { } |
|
0 |
2 |
elsif ($data->{'comment'}) { } |
409
|
0 |
0 |
if $comment |
415
|
0 |
2 |
if ($view_comment_perl) |
419
|
0 |
2 |
$self->inherit_from_core ? : |
420
|
2 |
0 |
unless $data->{'components'} |
421
|
2 |
0 |
$components ? : |
426
|
2 |
0 |
if (not $self->column_details) { } |
438
|
0 |
2 |
$self->inherit_from_core ? : |
439
|
0 |
2 |
$self->utf8 ? : |
444
|
0 |
2 |
unless $view->tables |
487
|
5 |
83 |
if ($column->datatype =~ /char/i and $column->length <= 0) |
497
|
8 |
80 |
if $column->autoincrement |
498
|
18 |
70 |
unless $column->not_null |
499
|
41 |
47 |
if $size > 0 |
500
|
4 |
84 |
if length $default_value |
502
|
47 |
41 |
if (&first(sub {
$column->datatype eq $_;
}
, 'SMALLINT', 'INT', 'INTEGER', 'BIGINT', 'MEDIUMINT', 'NUMERIC', 'DECIMAL')) |
506
|
77 |
11 |
if ($table->isa('MySQL::Workbench::Parser::Table')) |
507
|
47 |
30 |
if &first(sub {
$name eq $_;
}
, @{$table->primary_key;}) |
508
|
19 |
58 |
if $foreign_keys->{$name} |
512
|
2 |
86 |
if (%flags) |
519
|
18 |
70 |
if ($data and $data->{'column_info'}{$name} or $col_comment) |
530
|
11 |
7 |
unless (eval {
do {
$comment_data = 'JSON'->new->decode($col_comment);
1
}
}) |
531
|
1 |
10 |
if ($col_comment =~ /\{/) |
536
|
12 |
6 |
if (not $comment_data or 'HASH' ne ref $comment_data) { } |
545
|
14 |
4 |
unless $data->{'column_info'}{$name} |
549
|
5 |
13 |
if (%hash) |
564
|
12 |
76 |
if (@column_comment_lines) |
580
|
4 |
90 |
unless @indexes |
581
|
3 |
87 |
if $self->skip_indexes |
591
|
1 |
155 |
unless $type |
594
|
84 |
72 |
if $type eq 'primary' |
596
|
21 |
51 |
if ($type eq 'unique') |
603
|
50 |
1 |
if $type eq 'index' |
617
|
20 |
67 |
if $unique_indexes |
619
|
60 |
27 |
unless $hooks |
654
|
23 |
17 |
unless defined $schema_name |
656
|
27 |
13 |
unless ($schema_name) |
660
|
26 |
6 |
unless (grep {$_ eq $schema;} @class_names) |
667
|
1 |
39 |
unless $schema_name |
686
|
9 |
30 |
if ($version) |
695
|
8 |
31 |
if ($self->resultset_namespace) |
699
|
3 |
36 |
if ($self->load_resultset_namespace) |
702
|
2 |
1 |
ref $self->load_resultset_namespace ? : |
706
|
3 |
36 |
if ($self->load_result_namespace) |
709
|
2 |
1 |
ref $self->load_result_namespace ? : |
713
|
12 |
27 |
if ($self->result_namespace) |
716
|
11 |
1 |
unless $found |
720
|
8 |
31 |
unless $version_add |
722
|
9 |
30 |
if ($version) |
726
|
30 |
9 |
unless $version |
734
|
18 |
5 |
@namespaces == 1 ? : |
740
|
12 |
27 |
if @namespace_types |
742
|
1 |
38 |
$self->utf8 ? : |
743
|
38 |
1 |
$self->schema_base_class ? : |