| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package DBIx::Romani::Query::SQL::Column; |
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
sub new |
|
5
|
|
|
|
|
|
|
{ |
|
6
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
|
7
|
0
|
|
|
|
|
|
my $args = shift; |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# TODO: Column should have an optional table part!! |
|
10
|
|
|
|
|
|
|
|
|
11
|
0
|
|
|
|
|
|
my $table_name; |
|
12
|
|
|
|
|
|
|
my $column_name; |
|
13
|
|
|
|
|
|
|
|
|
14
|
0
|
0
|
|
|
|
|
if ( ref($args) eq 'HASH' ) |
|
15
|
|
|
|
|
|
|
{ |
|
16
|
0
|
|
|
|
|
|
$table_name = $args->{table}; |
|
17
|
0
|
|
|
|
|
|
$column_name = $args->{name}; |
|
18
|
|
|
|
|
|
|
} |
|
19
|
|
|
|
|
|
|
else |
|
20
|
|
|
|
|
|
|
{ |
|
21
|
0
|
|
|
|
|
|
$table_name = $args; |
|
22
|
0
|
|
|
|
|
|
$column_name = shift; |
|
23
|
|
|
|
|
|
|
} |
|
24
|
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
my $self = { |
|
26
|
|
|
|
|
|
|
table => $table_name, |
|
27
|
|
|
|
|
|
|
name => $column_name, |
|
28
|
|
|
|
|
|
|
}; |
|
29
|
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
bless $self, $class; |
|
31
|
0
|
|
|
|
|
|
return $self; |
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
|
|
34
|
0
|
|
|
0
|
0
|
|
sub get_table { return shift->{table}; } |
|
35
|
0
|
|
|
0
|
0
|
|
sub get_name { return shift->{name}; } |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub visit |
|
38
|
|
|
|
|
|
|
{ |
|
39
|
0
|
|
|
0
|
0
|
|
my ($self, $visitor) = @_; |
|
40
|
0
|
|
|
|
|
|
return $visitor->visit_sql_column( $self ); |
|
41
|
|
|
|
|
|
|
} |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub clone |
|
44
|
|
|
|
|
|
|
{ |
|
45
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
46
|
|
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
my $args = { |
|
48
|
|
|
|
|
|
|
table => $self->get_table(), |
|
49
|
|
|
|
|
|
|
name => $self->get_name() |
|
50
|
|
|
|
|
|
|
}; |
|
51
|
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
return DBIx::Romani::Query::SQL::Column->new($args); |
|
53
|
|
|
|
|
|
|
} |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |
|
56
|
|
|
|
|
|
|
|