New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for LIMIT OFFSET for db2 #275

Merged
merged 5 commits into from Nov 23, 2017

Conversation

Projects
None yet
7 participants
@akrabat
Member

akrabat commented Oct 13, 2017

Since 2016, DB2 has supported the LIMIT x OFFSET y construct. This PR supports the new construct in a BC manner via a feature flag. To use with TableGateway:

$tableGateway = new TableGateway($table, $adapter);
$decorator = $tableGateway->getSql()->getSqlPlatform()->getDecorators()['Zend\Db\Sql\Select'];
$decorator->setSupportsLimitOffset(true);
@akrabat

This comment has been minimized.

Show comment
Hide comment
@akrabat

akrabat Oct 16, 2017

Member

@samsonasik Addressed.

Member

akrabat commented Oct 16, 2017

@samsonasik Addressed.

@mwillbanks

Just formatting, other than the formatting, everything here looks great.

Show outdated Hide outdated src/Sql/Platform/IbmDb2/SelectDecorator.php Outdated
Show outdated Hide outdated src/Sql/Platform/IbmDb2/SelectDecorator.php Outdated
Show outdated Hide outdated src/Sql/Platform/IbmDb2/SelectDecorator.php Outdated
@guidofaecke

This comment has been minimized.

Show comment
Hide comment
@guidofaecke

guidofaecke Oct 31, 2017

Just took a quick look at the code.
I assume "ORDER BY" is still functional, since "ROW_NUMBER() OVER()" is now "missing"?

guidofaecke commented Oct 31, 2017

Just took a quick look at the code.
I assume "ORDER BY" is still functional, since "ROW_NUMBER() OVER()" is now "missing"?

@akrabat

This comment has been minimized.

Show comment
Hide comment
@akrabat

akrabat Nov 2, 2017

Member

Just took a quick look at the code.
I assume "ORDER BY" is still functional, since "ROW_NUMBER() OVER()" is now "missing"?

Correct - ORDER BY is supported as you'd expect if you've used Zend\Db with MySQL for instance.

Member

akrabat commented Nov 2, 2017

Just took a quick look at the code.
I assume "ORDER BY" is still functional, since "ROW_NUMBER() OVER()" is now "missing"?

Correct - ORDER BY is supported as you'd expect if you've used Zend\Db with MySQL for instance.

@akrabat

This comment has been minimized.

Show comment
Hide comment
@akrabat

akrabat Nov 2, 2017

Member

@mwillbanks Requested changes are done.

Member

akrabat commented Nov 2, 2017

@mwillbanks Requested changes are done.

@ezimuel ezimuel merged commit 547215b into zendframework:develop Nov 23, 2017

1 of 2 checks passed

coverage/coveralls Coverage decreased (-0.1%) to 46.934%
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@ezimuel

This comment has been minimized.

Show comment
Hide comment
@ezimuel

ezimuel Nov 23, 2017

Member

@akrabat thanks for your contribution!

Member

ezimuel commented Nov 23, 2017

@akrabat thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment