DBIx/Class/SQLMaker/ACCESS.pm

filter: Statementstmt 100% 19 / 19 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 27 / 27 CC 2 SCAR 2.9
CC
2
Cov
100%
_recurse_from
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« DBIx/Class/SQLMaker/Oracle.pm ↑ Summary DBIx/Class/Storage/DBI/Replicated/Balancer.pm »
1 package # Hide from PAUSE
2 DBIx::Class::SQLMaker::ACCESS;
3  
4 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 ▶use base 'DBIx::Class::SQLMaker';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 # inner joins must be prefixed with 'INNER '
9 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
10 1 my $class = shift;
11 1 my $self = $class->next::method(@_);
12  
13 1 $self->{_default_jointype} = 'INNER';
14  
15 1 return $self;
16 }
17  
18 # MSAccess is retarded wrt multiple joins in FROM - it requires a certain
19 # way of parenthesizing each left part before each next right part
20 6 ▶sub _recurse_from {
Subroutine _recurse_from: called CC=2 SCAR=6.9
21 6 my @j = shift->_gen_from_blocks(@_);
22  
23 # first 2 steps need no parenthesis
24 6 my $fin_join = join (' ', splice @j, 0, 2);
25  
26 6 ▶ while (@j) {
Branch: 1 branch
BranchTrueFalseTotal
if (@j) 5 6 11
27 5 $fin_join = sprintf '( %s ) %s', $fin_join, (shift @j);
28 }
29  
30 # the entire FROM is *ALSO* expected parenthesized
31 6 "( $fin_join )";
32 }
33  
34 3 1;
« DBIx/Class/SQLMaker/Oracle.pm ↑ Summary DBIx/Class/Storage/DBI/Replicated/Balancer.pm »