| 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
| |||||||||||
| 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__ | ||||||||||