EntityModel/Query/SubQuery.pm

filter: Statementstmt 31.5% 6 / 19 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 25.0% 1 / 4 Podpod 66.6% 2 / 3 totaltotal 30.0% 9 / 30 CC 3 SCAR 19.2
CC
3
Cov
26%
inlineSQL
12.0
type
2.0
subtype
2.0
CRAP 6.8
« EntityModel/Query/Table.pm ↑ Summary EntityModel/Query/ParseSQL.pm »
1 package EntityModel::Query::SubQuery;
2 {
3 33 $EntityModel::Query::SubQuery::VERSION = '0.102';
4 }
5 33 ▶use EntityModel::Class {
Subroutine BEGIN: called CC=1 SCAR=0.0
6 33 _isa => [qw{EntityModel::Query}],
7 subquery => { type => 'array', subclass => 'EntityModel::Query' }
8 33 };
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<Entitymodel::Query>.
21  
22 =head1 DESCRIPTION
23  
24 See L<Entitymodel::Query>.
25  
26 =cut
27  
28 =head1 METHODS
29  
30 =cut
31  
32 # We behave as a select
33 0 ▶sub type { 'select'; }
Subroutine type: not called CC=1 SCAR=6.9
Pod documented
34  
35 0 ▶sub subtype { die 'virtual method subtype called'; }
Subroutine subtype: not called CC=1 SCAR=6.9
Pod undocumented
36  
37 0 ▶sub inlineSQL {
Subroutine inlineSQL: not called CC=3 SCAR=24.8
Pod documented
38 0 my $self = shift;
39 0 my @sql;
40 0 my @sub = $self->subquery->list;
41 0 ▶ while(@sub) {
Branch: 1 branch
BranchTrueFalseTotal
if (@sub) 0 0 0
42 0 my $entry = shift(@sub);
43 0 push @sql, '(';
44 0 push @sql, @{ $entry->inlineSQL };
45 0 push @sql, ')';
46 0 ▶ push @sql, ' ' . $self->subtype . ' ' if @sub;
Branch: 1 branch
BranchTrueFalseTotal
if @sub 0 0 0
47 }
48 0 return \@sql;
49 }
50  
51 33 1;
52  
53 __END__
« EntityModel/Query/Table.pm ↑ Summary EntityModel/Query/ParseSQL.pm »