line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ObjectDB::Meta::Relationship; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
8
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
28
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
50
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '3.27'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
require Carp; |
9
|
1
|
|
|
1
|
|
6
|
use ObjectDB::Util qw(load_class); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
366
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
12
|
5
|
|
|
5
|
0
|
10
|
my $class = shift; |
13
|
5
|
|
|
|
|
15
|
my (%params) = @_; |
14
|
|
|
|
|
|
|
|
15
|
5
|
|
|
|
|
10
|
my $self = {}; |
16
|
5
|
|
|
|
|
8
|
bless $self, $class; |
17
|
|
|
|
|
|
|
|
18
|
5
|
|
33
|
|
|
25
|
$self->{name} = $params{name} || Carp::croak('name required'); |
19
|
5
|
|
33
|
|
|
13
|
$self->{type} = $params{type} || Carp::croak('type required'); |
20
|
|
|
|
|
|
|
$self->{orig_class} = |
21
|
5
|
|
33
|
|
|
10
|
$params{orig_class} || Carp::croak('orig_class required'); |
22
|
5
|
|
|
|
|
11
|
$self->{class} = $params{class}; |
23
|
5
|
|
|
|
|
6
|
$self->{map} = $params{map}; |
24
|
5
|
|
50
|
|
|
19
|
$self->{join} = $params{join} || 'left'; |
25
|
5
|
|
50
|
|
|
17
|
$self->{constraint} = $params{constraint} || []; |
26
|
|
|
|
|
|
|
|
27
|
5
|
|
|
|
|
31
|
return $self; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
0
|
0
|
|
sub name { $_[0]->{name} } |
31
|
0
|
|
|
0
|
0
|
|
sub map { $_[0]->{map} } |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
0
|
0
|
|
sub is_multi { 0 } |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub orig_class { |
36
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
my $orig_class = $self->{orig_class}; |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
|
|
|
load_class $orig_class; |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
return $orig_class; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub class { |
46
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
my $class = $self->{class}; |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
load_class $class; |
51
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
return $class; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |