Skip to content
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

Fix incorrect rowCount value when using groupBy with fetchPage #1852

Merged
merged 2 commits into from Jun 4, 2018

Conversation

ricardograca
Copy link
Member

Introduction

Fixes incorrect rowCount value when using a groupBy statement with the pagination plugin's fetchPage() method.

Motivation

There was already a previous PR, linked above, but its author didn't seem interested in adding the required tests.

Proposed solution

This is a simpler solution than the one in the previous PR, since it doesn't try to make a different type of query to get the total count, which would require additional processing. This just changes the column names that are passed to the existing countDistinct query.

Closes #1827, fixes #1489.

@ricardograca ricardograca changed the title Rg count groupby Fix incorrect rowCount value when using groupBy with fetchPage Jun 1, 2018
@ricardograca ricardograca added this to To Do in Version 0.14.0 via automation Jun 1, 2018
@ricardograca ricardograca moved this from To Do to In progress in Version 0.14.0 Jun 1, 2018
@ricardograca ricardograca merged commit 8a0b81f into master Jun 4, 2018
Version 0.14.0 automation moved this from In progress to Done Jun 4, 2018
@ricardograca ricardograca deleted the rg-count-groupby branch June 4, 2018 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

pagination plugin counting issue on groupBy query
1 participant