line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ObjectDB::Meta::Relationship; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '3.26'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
require Carp; |
9
|
1
|
|
|
1
|
|
4
|
use ObjectDB::Util qw(load_class); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
318
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
12
|
5
|
|
|
5
|
0
|
7
|
my $class = shift; |
13
|
5
|
|
|
|
|
12
|
my (%params) = @_; |
14
|
|
|
|
|
|
|
|
15
|
5
|
|
|
|
|
8
|
my $self = {}; |
16
|
5
|
|
|
|
|
7
|
bless $self, $class; |
17
|
|
|
|
|
|
|
|
18
|
5
|
|
33
|
|
|
20
|
$self->{name} = $params{name} || Carp::croak('name required'); |
19
|
5
|
|
33
|
|
|
10
|
$self->{type} = $params{type} || Carp::croak('type required'); |
20
|
|
|
|
|
|
|
$self->{orig_class} = |
21
|
5
|
|
33
|
|
|
9
|
$params{orig_class} || Carp::croak('orig_class required'); |
22
|
5
|
|
|
|
|
8
|
$self->{class} = $params{class}; |
23
|
5
|
|
|
|
|
5
|
$self->{map} = $params{map}; |
24
|
5
|
|
50
|
|
|
16
|
$self->{join} = $params{join} || 'left'; |
25
|
5
|
|
50
|
|
|
15
|
$self->{constraint} = $params{constraint} || []; |
26
|
|
|
|
|
|
|
|
27
|
5
|
|
|
|
|
24
|
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; |