-
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove order by in count queries (#699)
[closes #529] Co-authored-by: mrceperka <[email protected]>
- Loading branch information
Showing
5 changed files
with
23 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
4 changes: 2 additions & 2 deletions
4
tests/sqls/NextrasTests/Orm/Integration/Collection/CollectionTest_testCountOnLimited.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
SELECT "books".* FROM "books" AS "books" ORDER BY "books"."id" ASC LIMIT 1 OFFSET 1; | ||
SELECT "books".* FROM "books" AS "books" ORDER BY "books"."id" ASC LIMIT 1 OFFSET 10; | ||
SELECT COUNT(*) AS count FROM (SELECT "books"."id" FROM "books" AS "books" ORDER BY "books"."id" ASC LIMIT 1 OFFSET 1) temp; | ||
SELECT COUNT(*) AS count FROM (SELECT "books"."id" FROM "books" AS "books" ORDER BY "books"."id" ASC LIMIT 1 OFFSET 10) temp; | ||
SELECT COUNT(*) AS count FROM (SELECT "books"."id" FROM "books" AS "books" LIMIT 1 OFFSET 1) temp; | ||
SELECT COUNT(*) AS count FROM (SELECT "books"."id" FROM "books" AS "books" LIMIT 1 OFFSET 10) temp; |
This file contains 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
2 changes: 2 additions & 0 deletions
2
...sts/Orm/Integration/Collection/CollectionTest_testCountStoredDbalWithoutOrderByClause.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT COUNT(*) AS count FROM (SELECT "books"."id" FROM "books" AS "books") temp; | ||
SELECT COUNT(*) AS count FROM (SELECT "books"."id" FROM "books" AS "books" LIMIT 10 OFFSET 0) temp; |