line |
true |
false |
branch |
96
|
0 |
34 |
unless ref $table_ids eq 'ARRAY'
|
98
|
0 |
34 |
unless @$table_ids
|
102
|
0 |
34 |
unless my $fields = $dbrh->select(-'table', 'dbr_fields', -'fields', 'field_id table_id name data_type is_nullable is_signed is_pkey trans_id max_value regex default_val', -'where', {'table_id', ['d in', @$table_ids]}, -'arrayref', 1)
|
116
|
82 |
262 |
if $$field[6]
|
118
|
82 |
262 |
$$field[6] ? :
|
|
0 |
344 |
unless 'DBR::Config::Table'->_register_field('table_id', $$field[1], 'name', $$field[2], 'field_id', $$field[0], 'is_pkey', $$field[6] ? 1 : 0, 'is_req', !($$field[4] || $$field[6]))
|
128
|
18 |
326 |
if ($datatype_lookup{$$field[3]}{'handle'} eq 'datetime')
|
132
|
0 |
344 |
unless _gen_valcheck($field)
|
135
|
55 |
289 |
if $$field[7]
|
138
|
24 |
10 |
if (@trans_fids)
|
140
|
0 |
24 |
unless 'DBR::Config::Trans'->load('session', $session, 'instance', $instance, 'field_id', \@trans_fids)
|
157
|
250 |
103 |
if ($$dt{'numeric'}) { }
|
160
|
228 |
22 |
if ($$dt{'bits'} ne 'NA')
|
163
|
0 |
228 |
if ($$fieldref[5])
|
167
|
53 |
50 |
unless $$fieldref[4]
|
168
|
85 |
18 |
if ($$fieldref[8] =~ /^\d+$/ and $$fieldref[8] > 0)
|
177
|
18 |
335 |
if (defined $$fieldref[9] and length $$fieldref[9])
|
185
|
198 |
155 |
if length $code and $$fieldref[4]
|
212
|
0 |
472 |
unless $$self[0]
|
213
|
0 |
472 |
unless $$self[1]
|
215
|
0 |
472 |
unless $FIELDS_BY_ID{$$self[0]}
|
224
|
233 |
42 |
$params{'with_index'} ? :
|
|
0 |
275 |
$params{'with_alias'} ? :
|
268
|
242 |
58 |
$datatype_lookup{$$field[3]}{'numeric'} ? :
|
274
|
195 |
68 |
unless my $trans_id = $FIELDS_BY_ID{$$self[0]}[7]
|
290
|
0 |
37 |
unless $$self[1]->is_admin
|
294
|
0 |
37 |
unless my $trans_defs = 'DBR::Config::Trans'->list_translators
|
298
|
0 |
37 |
unless my $new_trans = $trans_lookup{uc $transname}
|
300
|
0 |
37 |
if $existing_trans_id and $$new_trans{'id'} == $existing_trans_id
|
303
|
0 |
37 |
unless my $instance = $self->table->conf_instance
|
304
|
0 |
37 |
unless my $dbrh = $instance->connect
|
306
|
0 |
37 |
unless $dbrh->update(-'table', 'dbr_fields', -'fields', {'trans_id', ['d', $$new_trans{'id'}]}, -'where', {'field_id', ['d', $self->field_id]})
|
321
|
0 |
9 |
unless $$self[1]->is_admin
|
324
|
0 |
9 |
if defined $existing_regex and $regex eq $existing_regex
|
326
|
0 |
9 |
unless my $instance = $self->table->conf_instance
|
327
|
0 |
9 |
unless my $dbrh = $instance->connect
|
329
|
0 |
9 |
unless $dbrh->update(-'table', 'dbr_fields', -'fields', {'regex', $regex}, -'where', {'field_id', ['d', $self->field_id]})
|
346
|
0 |
0 |
unless $$self[1]->is_admin
|
349
|
0 |
0 |
if defined $existing_value and $value eq $existing_value
|
351
|
0 |
0 |
unless my $instance = $self->table->conf_instance
|
352
|
0 |
0 |
unless my $dbrh = $instance->connect
|
354
|
0 |
0 |
unless $dbrh->update(-'table', 'dbr_fields', -'fields', {'default_val', $value}, -'where', {'field_id', ['d', $self->field_id]})
|