line |
true |
false |
branch |
24
|
0 |
17 |
unless $$self{'session'}
|
25
|
0 |
17 |
unless $$self{'conf_instance'}
|
26
|
0 |
17 |
unless $$self{'scan_instance'}
|
28
|
0 |
17 |
unless $$self{'schema_id'} = $$self{'scan_instance'}->schema_id
|
42
|
0 |
41 |
if $params{'pretty'}
|
44
|
0 |
41 |
unless my $fields = $self->scan_fields($table)
|
45
|
41 |
0 |
$pkeys ? :
|
47
|
0 |
41 |
unless $self->update_table($fields, $table, $pkey)
|
52
|
0 |
17 |
unless 'DBR::Config::Schema'->load('session', $$self{'session'}, 'schema_id', $$self{'schema_id'}, 'instance', $$self{'conf_instance'})
|
72
|
0 |
17 |
unless $sth
|
76
|
0 |
41 |
unless $$row{'PK_NAME'} eq 'PRIMARY KEY'
|
77
|
0 |
41 |
unless my $table = $$row{'TABLE_NAME'}
|
78
|
0 |
41 |
unless my $field = $$row{'COLUMN_NAME'}
|
91
|
0 |
17 |
unless my $sth = $dbh->table_info
|
96
|
0 |
90 |
unless my $name = $$row{'TABLE_NAME'}
|
98
|
15 |
75 |
if $name eq 'sqlite_sequence'
|
100
|
41 |
34 |
if ($$row{'TABLE_TYPE'} eq 'TABLE')
|
116
|
0 |
41 |
unless my $sth = $dbh->column_info(undef, undef, $table, undef)
|
137
|
0 |
41 |
unless my $tables = $dbh->select(-'table', 'dbr_tables', -'fields', 'table_id schema_id name', -'where', {'schema_id', ['d', $$self{'schema_id'}], 'name', $name})
|
150
|
0 |
41 |
if ($table) { }
|
153
|
0 |
41 |
unless $table_id = $dbh->insert(-'table', 'dbr_tables', -'fields', {'schema_id', ['d', $$self{'schema_id'}], 'name', $name})
|
163
|
0 |
41 |
unless $self->update_fields($fields, $table_id, $pkey)
|
177
|
0 |
41 |
unless my $records = $dbh->select(-'table', 'dbr_fields', -'fields', 'field_id table_id name data_type is_nullable is_signed max_value', -'where', {'table_id', ['d', $table_id]})
|
190
|
0 |
172 |
unless my $name = $$field{'COLUMN_NAME'}
|
191
|
0 |
172 |
unless my $type = $$field{'TYPE_NAME'}
|
195
|
0 |
172 |
unless defined $nullable
|
201
|
0 |
172 |
if (defined $extra)
|
202
|
0 |
0 |
$extra =~ / unsigned/i ? :
|
203
|
0 |
0 |
if $type =~ /unsigned/i
|
207
|
0 |
172 |
unless my $typeid = 'DBR::Config::Field'->get_type_id($type)
|
211
|
108 |
64 |
$nullable ? :
|
218
|
41 |
131 |
if (defined $pkey)
|
219
|
41 |
0 |
$pkey ? :
|
222
|
0 |
172 |
if ($record) { }
|
223
|
0 |
0 |
unless $dbh->update(-'table', 'dbr_fields', -'fields', $ref, -'where', {'field_id', ['d', $$record{'field_id'}]})
|
233
|
0 |
172 |
unless my $field_id = $dbh->insert(-'table', 'dbr_fields', -'fields', $ref)
|
247
|
0 |
0 |
unless $dbh->delete(-'table', 'dbr_fields', -'where', {'field_id', ['d', $$record{'field_id'}]})
|