line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DBR::Config::Table::Common; |
2
|
|
|
|
|
|
|
|
3
|
18
|
|
|
18
|
|
139
|
use strict; |
|
18
|
|
|
|
|
44
|
|
|
18
|
|
|
|
|
853
|
|
4
|
18
|
|
|
18
|
|
214
|
use base 'DBR::Common'; |
|
18
|
|
|
|
|
36
|
|
|
18
|
|
|
|
|
1315
|
|
5
|
18
|
|
|
18
|
|
108
|
use Carp; |
|
18
|
|
|
|
|
45
|
|
|
18
|
|
|
|
|
4432
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub alias{ |
8
|
2383
|
|
|
2383
|
0
|
7890
|
my $self = shift; |
9
|
2383
|
|
|
|
|
4067
|
my $set = shift; |
10
|
2383
|
100
|
|
|
|
5618
|
if($set){ |
11
|
15
|
50
|
|
|
|
43
|
croak "Cannot set the alias on a table object twice" if defined( $self->{alias} ); # I want this to fail obnoxiously |
12
|
15
|
|
|
|
|
54
|
return $self->{alias} = $set; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
2368
|
|
|
|
|
7591
|
return $self->{alias}; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
0
|
0
|
0
|
sub validate { 1 } |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub sql { |
22
|
1135
|
|
|
1135
|
0
|
2081
|
my $self = shift; |
23
|
1135
|
|
|
|
|
4109
|
my $name = $self->name; |
24
|
1135
|
|
|
|
|
12134
|
my $alias = $self->alias; |
25
|
|
|
|
|
|
|
|
26
|
1135
|
|
|
|
|
2130
|
my $sql = $name; |
27
|
1135
|
100
|
|
|
|
3453
|
$sql .= ' AS ' . $alias if $alias; |
28
|
|
|
|
|
|
|
|
29
|
1135
|
|
|
|
|
7910
|
return $sql; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |