line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package EntityModel::Query::SubQuery; |
2
|
|
|
|
|
|
|
{ |
3
|
|
|
|
|
|
|
$EntityModel::Query::SubQuery::VERSION = '0.102'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
use EntityModel::Class { |
6
|
16
|
|
|
|
|
148
|
_isa => [qw{EntityModel::Query}], |
7
|
|
|
|
|
|
|
subquery => { type => 'array', subclass => 'EntityModel::Query' } |
8
|
16
|
|
|
16
|
|
11915
|
}; |
|
16
|
|
|
|
|
39
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
EntityModel::Query::SubQuery - subquery |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 VERSION |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
version 0.102 |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 SYNOPSIS |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
See L. |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 DESCRIPTION |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
See L. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=cut |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 METHODS |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=cut |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
# We behave as a select |
33
|
0
|
|
|
0
|
1
|
|
sub type { 'select'; } |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
0
|
0
|
|
sub subtype { die 'virtual method subtype called'; } |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub inlineSQL { |
38
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
39
|
0
|
|
|
|
|
|
my @sql; |
40
|
0
|
|
|
|
|
|
my @sub = $self->subquery->list; |
41
|
0
|
|
|
|
|
|
while(@sub) { |
42
|
0
|
|
|
|
|
|
my $entry = shift(@sub); |
43
|
0
|
|
|
|
|
|
push @sql, '('; |
44
|
0
|
|
|
|
|
|
push @sql, @{ $entry->inlineSQL }; |
|
0
|
|
|
|
|
|
|
45
|
0
|
|
|
|
|
|
push @sql, ')'; |
46
|
0
|
0
|
|
|
|
|
push @sql, ' ' . $self->subtype . ' ' if @sub; |
47
|
|
|
|
|
|
|
} |
48
|
0
|
|
|
|
|
|
return \@sql; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
__END__ |