-
-
Notifications
You must be signed in to change notification settings - Fork 213
Run a more robust count query that supports "group by" #1382
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
base: develop
Are you sure you want to change the base?
Conversation
@lex0r thanks for this PR. Can you give a bit more details on exactly what those methods do, I am not familiar with them. |
@mjauvin both the original |
@lex0r what about Also, unit test for this would be very appreciated. |
|
I'm worried that the code here will have a hard time because of this: winter/modules/backend/widgets/Lists.php Line 738 in 054fa05
|
The good news is that we only need to run a count query, so not interested in any actual record data.
@mjauvin not sure I'm following your concern. The code I suggested is absolutely pagination friendly, it's even in the name of the method. Surely it will work whatever pagination method is used? |
I would expect a unit test that checks for what records are returned based on the requested page to already exist. If it doesn't exist then it's probably not very important, but even if it is, I can't promise I will have time to look into creating a test for pagination unless there's some ground work that has been done and it won't take long to implement :) |
@lex0r if you aren't able to create a unit test case for this can you create a PR in the test plugin that replicates the original issue and provides instructions for testing this fix? |
Fixes #454