line |
true |
false |
branch |
60
|
0 |
0 |
if ($@) |
77
|
0 |
0 |
if (%opts) |
83
|
0 |
0 |
if ($table->{'db_committed'} and not $all) { } |
86
|
0 |
0 |
unless $all or $column->last_object_revision eq '-' |
91
|
0 |
0 |
if ($column->data_length) |
94
|
0 |
0 |
if $ddl |
101
|
0 |
0 |
unless $all or $column->last_object_revision eq '-' |
103
|
0 |
0 |
unless defined $ddl |
106
|
0 |
0 |
if ($column->data_length) |
110
|
0 |
0 |
unless $column eq $columns[-1] |
112
|
0 |
0 |
if defined $ddl |
113
|
0 |
0 |
if $ddl |
130
|
42 |
0 |
$temp ? : |
135
|
27 |
16 |
if $p->class_name eq 'UR::Object' or $p->class_name eq 'UR::Entity' |
136
|
0 |
16 |
unless $p->class_name->isa('UR::Object') |
141
|
4 |
12 |
if (($parent_table) = grep({$_->isa('UR::DataSource::RDBMS::Table');} @new)) |
166
|
14 |
28 |
unless ($table_name) |
167
|
0 |
14 |
if (my(@column_names) = keys %properties_with_expected_columns) { } |
178
|
0 |
28 |
if ($table_name =~ /[^\w\.]/) |
189
|
28 |
0 |
if ($table) { } |
199
|
0 |
0 |
$table_name =~ /\s/ ? : |
207
|
0 |
0 |
unless $table |
239
|
65 |
0 |
if ($column->data_type) { } |
240
|
41 |
24 |
if $property->data_type |
252
|
4 |
27 |
unless ('UR::DataSource::RDBMS::PkConstraintColumn'->get('table_name', $table->table_name, 'column_name', $property->column_name, 'data_source', $table->data_source)) |
265
|
74 |
0 |
unless $id_by |
269
|
0 |
0 |
unless $r_table_name |
286
|
0 |
1 |
unless ($fk) |
304
|
1 |
0 |
unless ($fkcol) |
307
|
0 |
1 |
unless ($fkcol) |
316
|
28 |
0 |
if (@defined) |
319
|
4 |
24 |
unless ($exists) |
324
|
0 |
28 |
unless ($temp) |
327
|
0 |
0 |
if (@ddl) |
330
|
0 |
0 |
unless $dbh->do($ddl) |
387
|
0 |
0 |
unless (@class_meta) |
405
|
0 |
178 |
unless ($driver) |
408
|
0 |
178 |
unless ($server) |
418
|
0 |
2695 |
unless ($dbh and $dbh->{'Active'}) |
432
|
0 |
125 |
unless $ds_name |
473
|
0 |
175 |
if (not ref $self and $self->isa('UR::Singleton')) |
483
|
3 |
172 |
unless ($dbh) |
501
|
171 |
1 |
unless ($all_dbh_hashref) |
522
|
26 |
18 |
$self->owner ? : |
529
|
0 |
1 |
if (@_) |
543
|
0 |
2 |
if $self->_ignore_table($table_name) |
562
|
0 |
57 |
unless $dbh |
590
|
22 |
0 |
if (ref $self) { } |
591
|
22 |
0 |
if ($self->can('id')) { } |
616
|
0 |
128 |
unless ($column_obj) |
619
|
25 |
103 |
if ($column_obj->nullable and $column_obj->nullable ne 'N') |
636
|
25 |
0 |
unless grep {$fk_column eq $_;} keys %pk_columns |
647
|
0 |
0 |
if (@_) { } |
648
|
0 |
0 |
if ($self->has_default_handle) |
662
|
0 |
0 |
unless ($method =~ /^(.*)::([^\:]+)$/) |
663
|
0 |
0 |
if ref $class |
679
|
0 |
0 |
if ($self->camel_case_table_names) |
687
|
0 |
0 |
unless eval {
do {
$vocabulary->__meta__
}
} |
688
|
0 |
0 |
if ($vocabulary) { } |
700
|
0 |
0 |
if ($self->can('_resolve_class_name_for_table_name_fixups')) |
706
|
0 |
0 |
if ($relation_type and $relation_type =~ /view/i) { } |
714
|
0 |
0 |
if (substr($class_name, -6) eq '::Type') |
727
|
0 |
0 |
if ($self->camel_case_table_names) |
733
|
0 |
0 |
unless eval {
do {
$vocabulary->__meta__
}
} |
753
|
0 |
0 |
if ($self->camel_case_column_names) |
777
|
1 |
27 |
if ($table_object) { } |
785
|
1 |
0 |
if $table_object->__changes__ |
797
|
0 |
27 |
unless ($table_object) |
820
|
0 |
28 |
unless $table_object |
826
|
11 |
17 |
if ($self->_update_foreign_key_metadata_for_refresh($ds_owner, $db_table_name, $qualified_table_name, $creation_method, $revision_time, $table_object)) |
830
|
0 |
28 |
if ($self->_update_primary_key_metadata_for_refresh($ds_owner, $db_table_name, $qualified_table_name, $creation_method, $revision_time, $table_object)) |
834
|
0 |
28 |
if ($self->_update_unique_constraint_metadata_for_refresh($ds_owner, $db_table_name, $qualified_table_name, $creation_method, $revision_time, $table_object)) |
838
|
28 |
0 |
if $data_was_changed_for_this_table |
847
|
1 |
27 |
if ($column_count == 1 and $pk_column_count == 1) { } |
851
|
1 |
26 |
if ($constraint_count == $column_count) { } |
867
|
0 |
28 |
unless ($table_data and %$table_data) |
889
|
0 |
28 |
$self->can('db_name') ? : |
891
|
0 |
28 |
unless ($column_sth) |
896
|
0 |
28 |
unless (@$all_column_data) |
917
|
3 |
63 |
if ($column_obj) { } |
924
|
3 |
0 |
if ($column_obj->__changes__) |
947
|
0 |
66 |
unless ($column_obj) |
986
|
28 |
0 |
if ($fk_sth) |
990
|
36 |
45 |
unless defined $data->{$_} |
1009
|
0 |
9 |
unless $r_table_name and $r_column_name |
1017
|
6 |
3 |
unless ($fk) |
1030
|
6 |
3 |
if ($fk{$fk->id}) |
1039
|
6 |
0 |
unless ($fkcol) |
1060
|
28 |
0 |
if ($fk_reverse_sth) |
1064
|
74 |
82 |
unless defined $data->{$_} |
1083
|
0 |
12 |
unless $r_table_name and $r_column_name |
1090
|
7 |
5 |
unless ($fk) |
1098
|
0 |
7 |
unless ($fk) |
1106
|
7 |
5 |
if ($fk{$fk->fk_constraint_name}) |
1114
|
7 |
0 |
unless ('UR::DataSource::RDBMS::FkConstraintColumn'->get(%fkcol_params)) |
1129
|
0 |
4 |
unless ($fks_in_real_db{$fingerprint}) |
1148
|
28 |
0 |
if ($pk_sth) |
1157
|
1 |
26 |
if ($pk) |
1174
|
0 |
27 |
unless ($pk) |
1189
|
28 |
0 |
if (my $uc = $self->get_unique_index_details_from_data_dictionary($ds_owner, $db_table_name)) |
1197
|
0 |
8 |
unless my $uc_columns_1 = $uc{$uc_name_1} |
1202
|
8 |
0 |
if $uc_name_2 eq $uc_name_1 |
1203
|
0 |
0 |
unless my $uc_columns_2 = $uc{$uc_name_2} |
1207
|
0 |
0 |
if ($uc_columns_2_serial eq $uc_columns_1_serial) |
1237
|
8 |
0 |
if ($pk_columns_serial eq $uc_columns_serial) |
1254
|
0 |
0 |
if ($constraint_objs{$col_name}) { } |
1296
|
78 |
4773 |
unless $table_name |
1297
|
27 |
4746 |
if ($table_name =~ /(\w+)\.(\w+)/) { } |
1308
|
4364 |
2494 |
if ($column_name =~ /(\w+)\.(\w+)$/) { } |
1346
|
0 |
19 |
unless $parent_class |
1347
|
17 |
2 |
if (my $table_name = $parent_class->table_name) |
1364
|
2 |
11 |
unless $meta->table_name |
1368
|
0 |
11 |
if (@primary_keys > 1) { } |
|
11 |
0 |
elsif (@primary_keys == 1) { } |
1376
|
11 |
0 |
if $sequence |
1388
|
0 |
17 |
unless ($table_name) |
1397
|
6 |
11 |
if ($table_meta) { } |
1399
|
0 |
6 |
if (@primary_keys == 0) |
1421
|
0 |
59 |
if ($self->use_dummy_autogenerated_ids) |
1433
|
17 |
42 |
unless ($sequence) |
1436
|
0 |
17 |
unless ($sequence) |
1448
|
3 |
56 |
unless (defined $new_id) |
1464
|
0 |
0 |
$column_name eq uc $column_name ? : |
1473
|
24 |
1423 |
unless @$order_by_columns |
1479
|
0 |
2174 |
unless ($order_by_property_meta) |
1493
|
0 |
10 |
$query_plan->order_by_column_is_descending($column_name) ? : |
1512
|
8 |
1417 |
defined $limit_value ? : |
1515
|
5 |
1420 |
$self->_resolve_offset_value_from_query_plan($query_plan) ? : |
1519
|
5 |
1420 |
if ($limit and $offset) { } |
1532
|
3 |
0 |
unless ($rv) |
1585
|
0 |
1346 |
$connect_by_clause ? : |
|
505 |
1346 |
$where_clause ? : |
1587
|
1839 |
12 |
if ($more_sql) { } |
1601
|
1425 |
22 |
if $self->does_support_limit_offset($rule) |
1604
|
3 |
1444 |
if ($select_hint) |
1614
|
1334 |
113 |
if defined $where_clause and length $where_clause |
1615
|
0 |
1447 |
if $connect_by_clause |
1616
|
3 |
1444 |
if $group_by_clause |
1617
|
1423 |
24 |
if $order_by_clause |
1618
|
8 |
1439 |
if $limit_offset_clause |
1624
|
4 |
1430 |
unless ($sth) |
1629
|
1 |
1429 |
unless ($sth->execute(@all_sql_params)) |
1635
|
0 |
1429 |
unless $sth |
1649
|
22 |
3951 |
unless ($sth) |
1657
|
1396 |
2555 |
unless ($next_db_row) |
1664
|
0 |
2555 |
if ($post_process_results_callback) |
1669
|
78 |
2477 |
if $ur_test_fill_db |
1705
|
6 |
140 |
unless &$inserter |
1751
|
4 |
100 |
if _object_was_saved_to_database_by_this_process($class_name, $id) |
1753
|
92 |
8 |
if (&$check_id_is_not_null($next_db_row) and not $seen_ids{$id}++) |
1756
|
72 |
20 |
unless ($count) |
1758
|
0 |
72 |
unless $insert_sth->execute(@column_values) |
1777
|
134 |
16 |
if defined $next_db_row->[$col] |
1817
|
1 |
0 |
if (not @fk_data or $row->{'ORDINAL_POSITION'} == 1 or $row->{'FK_NAME'} and not $seen_fk_names{$row->{'FK_NAME'}}++) |
1842
|
8 |
40 |
if (scalar @$fk_column_list != scalar values %is_pk_column_for_class) |
1848
|
36 |
4 |
unless $is_pk_column_for_class{$fk->{'FK_COLUMN_NAME'}} |
1853
|
0 |
20 |
if $checked{$parent_class_name}++ |
1856
|
4 |
16 |
unless $parent_class_meta |
1860
|
16 |
0 |
if scalar @$fk_column_list != scalar @pk_columns_for_parent |
1863
|
0 |
0 |
unless $is_pk_column_for_class{$parent_pk_column} |
1876
|
4 |
44 |
if _fk_represents_inheritance($load_class_name, $fk_column_list) |
1886
|
0 |
44 |
if (grep {not defined $_;} @fk_columns or not @fk_columns) |
1903
|
38 |
4 |
if (&$check_id_is_not_null($next_db_row)) |
1906
|
2 |
36 |
if _object_was_saved_to_database_by_this_process($pk_class_name, $id) |
1923
|
6 |
52 |
if exists $objects_in_database_saved_by_this_process{$class_name} and exists $objects_in_database_saved_by_this_process{$class_name}{$id} |
1926
|
166 |
52 |
unless $class_name->isa($saved_class) or $saved_class->isa($class_name) |
1927
|
0 |
52 |
if exists $objects_in_database_saved_by_this_process{$saved_class}{$id} |
1939
|
48 |
0 |
$pk_owner ? : |
1943
|
0 |
48 |
unless ($pk_class_name) |
1950
|
0 |
0 |
$fk_owner ? : |
1954
|
0 |
0 |
if ($fk_class_name) |
1956
|
0 |
0 |
if $_->id_by |
1967
|
0 |
48 |
unless ($pk_class_name) |
2047
|
0 |
90 |
unless $class_meta->has_table |
2067
|
220 |
8 |
unless $nullable |
2073
|
90 |
0 |
if @id_cols |
2078
|
0 |
90 |
unless ($dbh->do($sql)) |
2092
|
0 |
0 |
if ($schema_name) |
2093
|
0 |
0 |
unless $dbh->do("CREATE SCHEMA IF NOT EXISTS $schema_name") |
2134
|
1890 |
2558 |
if UR::Util::use_package_optimistically($op_class_name) |
2141
|
5 |
1539 |
unless defined $value |
2142
|
6 |
1533 |
if $value eq '' |
2143
|
0 |
0 |
if ref $value eq 'HASH' and $value->{'operator'} eq '=' and !defied($value->{'value'}) || $value->{'value'} eq '' |
2155
|
2 |
6 |
if (ref $sql eq 'ARRAY') { } |
2172
|
0 |
8 |
unless ($sth) |
2175
|
1 |
7 |
unless ($sth->{'NUM_OF_PARAMS'} == scalar @params) |
2188
|
3 |
4 |
if (grep {not defined $_;} @id_column_idx) |
2208
|
0 |
52 |
unless (ref $self) |
2209
|
0 |
0 |
if ($self->isa('UR::Singleton')) { } |
2224
|
6 |
111 |
if ($self->alternate_db_dsn) |
2258
|
6 |
111 |
unless @commands |
2278
|
39 |
88 |
if ($change->{'type'} eq 'insert') { } |
|
54 |
34 |
elsif ($change->{'type'} eq 'update') { } |
|
34 |
0 |
elsif ($change->{'type'} eq 'delete') { } |
2305
|
0 |
61 |
unless ($table_object) |
2308
|
0 |
0 |
unless ($table_object) |
2313
|
0 |
61 |
if (my(@bitmap_index_names) = $table_object->bitmap_index_names) |
2315
|
0 |
0 |
if ($changes = $insert{$table_name} or $changes = $delete{$table_name}) { } |
|
0 |
0 |
elsif (not $tables_requiring_lock{$table_name}) { } |
2323
|
0 |
0 |
if $column_name eq $last_column_name |
2329
|
0 |
0 |
if ($column_obj->bitmap_index_names) |
2354
|
31 |
30 |
if ($insert{$table_name}) |
2360
|
34 |
27 |
if ($update{$table_name}) |
2366
|
9 |
52 |
if ($delete{$table_name}) |
2372
|
0 |
61 |
unless ($matched_table_name) |
2379
|
6 |
25 |
if ($insert{$table_name} and $update{$table_name}) |
2384
|
7 |
2 |
if ($delete{$table_name} and $update{$table_name}) |
2389
|
0 |
9 |
if ($delete{$table_name} and $insert{$table_name} and not $update{$table_name}) |
2406
|
3 |
4 |
if ($insert{$table_name} and $insert{$r_table_name}) |
2415
|
2 |
10 |
if ($update{$table_name} and $insert{$r_table_name}) |
2424
|
3 |
0 |
if ($delete{$r_table_name} and $delete{$table_name}) |
2433
|
3 |
0 |
if ($delete{$r_table_name} and $update{$table_name}) |
2460
|
0 |
66 |
if ($unresolved_count == $last_unresolved_count) { } |
2490
|
1 |
65 |
unless (@ready_to_add) |
2532
|
23 |
0 |
if $prerequisites{$dependant} |
2535
|
17 |
6 |
if keys %{$prerequisites{$dependant};} == 0 |
2551
|
1 |
73 |
if (my $circular_fk_list = $self_referencing_table_commands{$general_command}) { } |
2567
|
1 |
0 |
$dml_type eq 'delete' ? : |
2579
|
0 |
5 |
if ($adding{$cmd}) |
2581
|
0 |
0 |
unless $main::skip_croak |
2591
|
5 |
0 |
if (defined $pid) |
2593
|
4 |
1 |
if $pcmd |
2600
|
9 |
1 |
unless $unsorted_cmds{$cmd->{'id'}} |
2604
|
1 |
0 |
if ($dml_type eq 'delete') |
2626
|
77 |
44 |
unless ($sth{$sql}) |
2635
|
4 |
73 |
unless ($sth) |
2644
|
57 |
16 |
unless ($tables) |
2653
|
57 |
7 |
unless (%$columns) |
2665
|
2 |
105 |
unless ($column) |
2669
|
0 |
4 |
if ($column) |
2689
|
0 |
48 |
if ($dbh->{'AutoCommit'} and not eval {
do {
$dbh->begin_work;
1
}
}) |
2699
|
0 |
48 |
if ($self->can_savepoint) |
2701
|
0 |
0 |
if ($savepoint) { } |
2708
|
0 |
0 |
unless ($self->set_savepoint($sp_name)) |
2720
|
0 |
48 |
if (my(@tables_requiring_lock) = sort(keys %tables_requiring_lock)) |
2730
|
0 |
0 |
unless ($sth->execute) |
2737
|
0 |
0 |
unless ($failed_attempts >= $max_failed_attempts) |
2742
|
0 |
0 |
if ($failed_attempts > 1) |
2744
|
0 |
0 |
if ($failed_attempts >= $max_failed_attempts) |
2769
|
1 |
116 |
unless ($sth{$cmd->{'sql'}}->execute(@{$$cmd{'params'};})) |
2775
|
0 |
0 |
if $skip_fault_tolerance_check |
2780
|
0 |
47 |
if (@failures) |
2785
|
0 |
0 |
if (@failures == $last_failure_count or $skip_fault_tolerance_check) { } |
2791
|
0 |
0 |
defined $_ ? : |
2811
|
0 |
47 |
if (@failures) |
2812
|
0 |
0 |
if (not $savepoint or $savepoint eq 'NONE') { } |
2825
|
0 |
47 |
unless ($self->_set_specified_objects_saved_uncommitted($changed_objects)) |
2830
|
0 |
47 |
if (exists $params{'commit_on_success'} and $params{'commit_on_success'} eq '1') |
2840
|
0 |
47 |
if (@previous_failure_sets) |
2846
|
0 |
0 |
unless $UR::Context::current->send_email('To', 'UR::Context::Process'->support_email, 'Subject', 'sync_database dependency sort failure', 'Message', $msg) |
2860
|
893 |
0 |
ref $self ? : |
2888
|
0 |
0 |
unless ($self->can_savepoint) |
2896
|
0 |
0 |
unless ($savepoint) |
2901
|
0 |
0 |
unless ($self->rollback_to_savepoint($sp_name)) |
2917
|
0 |
88 |
unless ($table_obj) |
2928
|
125 |
0 |
if (defined $values->[$values_idx]) { } |
2945
|
0 |
88 |
unless ($table_obj and $object_to_save) |
2951
|
10 |
88 |
unless $possible_class_obj->table_name |
2953
|
88 |
0 |
if ($possible_class_obj->table_name eq $table_obj->table_name) |
2959
|
0 |
88 |
unless (defined $class_obj) |
2970
|
0 |
125 |
unless ($pk_cols{$col_in_class}) |
2983
|
0 |
88 |
if (@bad_pk_cols) |
3005
|
64 |
178 |
unless (@table_class_obj) |
3010
|
194 |
48 |
if (@table_class_obj == 1) { } |
|
0 |
48 |
elsif (@table_class_obj > 1) { } |
3032
|
16 |
120 |
$object_to_save->{'db_saved_uncommitted'} ? : |
3038
|
46 |
90 |
if ($object_to_save->isa('UR::Object::Ghost')) { } |
|
44 |
46 |
elsif ($object_to_save->{$compare_version}) { } |
3058
|
90 |
46 |
unless $object_to_save->isa('UR::Entity::Ghost') |
3065
|
144 |
0 |
ref $self ? : |
3069
|
26 |
118 |
unless ($table) |
3073
|
0 |
26 |
unless ($table) |
3079
|
0 |
144 |
unless ($table_class) |
3085
|
0 |
144 |
unless ($data_source) |
3097
|
18 |
126 |
if ($table_class ne $class and $table_class . '::Ghost' ne $class) |
3098
|
0 |
18 |
if ($action eq 'delete') { } |
|
1 |
17 |
elsif ($action eq 'insert') { } |
3101
|
0 |
0 |
if ($replacement) |
3109
|
0 |
1 |
if ($replacing) |
3118
|
46 |
98 |
if ($table_action eq 'delete') { } |
|
52 |
46 |
elsif ($table_action eq 'update') { } |
|
46 |
0 |
elsif ($table_action eq 'insert') { } |
3129
|
21 |
25 |
if (@non_pk_nullable_fk_columns) |
3173
|
16 |
36 |
if (@save_table_names > 1) { } |
3192
|
0 |
50 |
unless $column_name |
3197
|
38 |
14 |
if (@changed_cols) |
3199
|
50 |
0 |
defined $_ && $object_to_save->can($_) ? : |
3202
|
0 |
50 |
unless $class_object->property_for_column($_) |
3207
|
0 |
38 |
if (scalar @changed_cols != scalar @changed_values) |
3255
|
98 |
0 |
defined $_ && $object_to_save->can($_) ? : |
3259
|
0 |
98 |
unless $class_object->property_for_column($_) |
3262
|
0 |
46 |
if (scalar @changed_cols != scalar @values) |
3277
|
4 |
42 |
if (%non_pk_nullable_fk_columns) { } |
3282
|
4 |
4 |
if ($non_pk_nullable_fk_columns{$col}) { } |
3303
|
4 |
0 |
if (%update_values) |
3354
|
1 |
133 |
unless $self->has_default_handle |
3357
|
0 |
133 |
unless ($dbh->$method(@_)) |
3367
|
114 |
1 |
if ($self->has_default_handle) |
3368
|
114 |
0 |
if (my $dbh = $self->get_default_handle) |
3369
|
0 |
114 |
if ($dbh->{'AutoCommit'}) |
3380
|
17 |
0 |
if ($self->has_default_handle) |
3381
|
17 |
0 |
if (my $dbh = $self->get_default_handle) |
3382
|
0 |
17 |
if ($dbh->{'AutoCommit'}) |
3393
|
2 |
0 |
if (not ref $self and $self->isa('UR::Singleton')) |
3413
|
35 |
3117 |
unless ($inheritance_class_object->table_name) |
3425
|
0 |
4735 |
unless $p |
3432
|
3117 |
0 |
if @id_column_names |
3449
|
2 |
10283 |
if $seen{$co->class_name}++ |
3451
|
6936 |
3347 |
unless $table_name |
3462
|
5718 |
12019 |
unless defined $_->column_name and $_->column_name ne '' |
3466
|
3117 |
230 |
if $class_meta eq $co |
3475
|
0 |
12023 |
if ($data_type =~ /LOB$/i) |
3484
|
0 |
3117 |
if (@lob_column_names) |
3486
|
0 |
0 |
if ($query_config) |
3544
|
1 |
3240 |
if (my $sql_function = $sql_property->calculate_sql) { } |
3545
|
1 |
0 |
ref $sql_property->calculate_from eq 'ARRAY' ? : |
3602
|
0 |
3 |
unless (defined $urtype) |
3625
|
0 |
228 |
if ($type and $type->isa('UR::Value')) |
3631
|
78 |
150 |
$type && $types{uc $type} ? : |
3655
|
0 |
0 |
if ($dbhs->{$k}) |
3674
|
15 |
169 |
$sql && $sql =~ /^(.*?)(?:\s+as)?\s+(\w+)\s*$/s ? : |