DB2/SQLMaker.pm

filter: Statementstmt 93.3% 14 / 15 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 90.9% 20 / 22 CC 2 SCAR 3.8
CC
2
Cov
88%
apply_limit
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.5
« DB2/Diff/Reorg.pm ↑ Summary DB2/Diff/ForeignKey.pm »
1 package DBIO::DB2::SQLMaker;
2 # ABSTRACT: SQL dialect for IBM DB2
3  
4 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 7 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 7 our $VERSION = '0.900007';
8  
9 7 ▶use base 'DBIO::SQLMaker';
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11  
12 1 ▶sub apply_limit {
Subroutine apply_limit: called CC=2 SCAR=7.6
Pod documented
13 1 my ($self, $sql, $rs_attrs, $rows, $offset) = @_;
14  
15 # With an offset: ROW_NUMBER() OVER(), the only one of the two that can skip rows
16 # Without one: FETCH FIRST n ROWS ONLY, which cannot express an offset
17 1 ▶ if ($offset) {
Branch: 1 branch
BranchTrueFalseTotal
if ($offset) 0 1 1
18 0 return $self->_RowNumberOver($sql, $rs_attrs, $rows, $offset);
19 }
20 1 return $self->_FetchFirst($sql, $rs_attrs, $rows, $offset);
21 }
22  
23 7 1;
24  
25 __END__
« DB2/Diff/Reorg.pm ↑ Summary DB2/Diff/ForeignKey.pm »