« blib/lib/DB/Introspector/Oracle/Introspector.pm
↑ Summary
blib/lib/DB/Introspector/CommonRDB/Introspector.pm »
| 1 | package DB::Introspector::MappedPath; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use base qw( DB::Introspector::ForeignKeyPath ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 0 | ▶ | sub head_column_names { | ||||||||
|
Subroutine
head_column_names: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 7 | 0 | my $self = shift; | |||||||||
| 8 | |||||||||||
| 9 | 0 | my @foreign_keys = $self->get_foreign_key_list; | |||||||||
| 10 | 0 | return $foreign_keys[0]->foreign_column_names; | |||||||||
| 11 | } | ||||||||||
| 12 | |||||||||||
| 13 | 0 | ▶ | sub tail_column_names { | ||||||||
|
Subroutine
tail_column_names: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 14 | 0 | my $self = shift; | |||||||||
| 15 | |||||||||||
| 16 | 0 | my @foreign_keys = $self->get_foreign_key_list; | |||||||||
| 17 | 0 | return $foreign_keys[$#foreign_keys]->local_column_names; | |||||||||
| 18 | } | ||||||||||
| 19 | |||||||||||
| 20 | 0 | ▶ | sub head_table { | ||||||||
|
Subroutine
head_table: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 21 | 0 | my $self = shift; | |||||||||
| 22 | |||||||||||
| 23 | 0 | my @foreign_keys = $self->get_foreign_key_list; | |||||||||
| 24 | 0 | return $foreign_keys[0]->foreign_table; | |||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | 0 | ▶ | sub tail_table { | ||||||||
|
Subroutine
tail_table: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 28 | 0 | my $self = shift; | |||||||||
| 29 | |||||||||||
| 30 | 0 | my @foreign_keys = $self->get_foreign_key_list; | |||||||||
| 31 | 0 | return $foreign_keys[$#foreign_keys]->local_table; | |||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | |||||||||||
| 35 | 0 | ▶ | sub head_for_tail_column { | ||||||||
|
Subroutine
head_for_tail_column: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||
| 36 | 0 | my $self = shift; | |||||||||
| 37 | 0 | my $tail_column_name = shift; | |||||||||
| 38 | |||||||||||
| 39 | 0 | foreach my $foreign_key (reverse $self->get_foreign_key_list) { | |||||||||
| 40 | 0 | $tail_column_name = | |||||||||
| 41 | $foreign_key->foreign_for_local_column($tail_column_name); | ||||||||||
| 42 | 0 | ▶ | return undef unless(defined $tail_column_name); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 43 | } | ||||||||||
| 44 | |||||||||||
| 45 | 0 | return $tail_column_name; | |||||||||
| 46 | } | ||||||||||
| 47 | |||||||||||
| 48 | 0 | ▶ | sub tail_for_head_column { | ||||||||
|
Subroutine
tail_for_head_column: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||
| 49 | 0 | my $self = shift; | |||||||||
| 50 | 0 | my $head_column_name = shift; | |||||||||
| 51 | |||||||||||
| 52 | 0 | foreach my $foreign_key ($self->get_foreign_key_list) { | |||||||||
| 53 | 0 | $head_column_name = | |||||||||
| 54 | $foreign_key->local_for_foreign_column($head_column_name); | ||||||||||
| 55 | 0 | ▶ | return undef unless(defined $head_column_name); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 56 | } | ||||||||||
| 57 | |||||||||||
| 58 | 0 | return $head_column_name; | |||||||||
| 59 | } | ||||||||||
| 60 | |||||||||||
| 61 | 1 | 1; | |||||||||