Remove order by clause from the item count query.#348
Merged
garak merged 1 commit intoKnpLabs:masterfrom Mar 20, 2025
kicken:remove-order-by
Merged
Remove order by clause from the item count query.#348garak merged 1 commit intoKnpLabs:masterfrom kicken:remove-order-by
garak merged 1 commit intoKnpLabs:masterfrom
kicken:remove-order-by
Conversation
Contributor
Author
garak
requested changes
Mar 18, 2025
Collaborator
garak
left a comment
There was a problem hiding this comment.
Please fix the CS failure.
Also, can you ensure that the problem that lead to the previous change is not regressed?
src/Knp/Component/Pager/Event/Subscriber/Paginate/Doctrine/DBALQueryBuilderSubscriber.php
Outdated
Show resolved
Hide resolved
Contributor
Author
|
I've removed the white space change. I've added another test for the group by situation and it is passing. I believe the change should not cause and regression issues for that. |
garak
approved these changes
Mar 19, 2025
Collaborator
garak
left a comment
There was a problem hiding this comment.
It's OK for me. I'll merge as soon as you solve the CS issue
SQL Server does not allow ORDER BY clauses in sub-queries unless they are limited by a TOP / OFFSET clause which we don't want to do when getting an item count.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SQL Server does not allow ORDER BY clauses in sub-queries unless they are limited by a TOP / OFFSET clause which we don't want to do when getting an item count.