fix: ignore case while sorting usernames (#7870)

This commit is contained in:
Marcin Tojek
2023-06-06 12:37:41 +02:00
committed by GitHub
parent 660bbb8d38
commit ee45b3df77
4 changed files with 11 additions and 8 deletions
+3 -3
View File
@@ -145,9 +145,9 @@ WHERE
-- The pagination cursor is the last ID of the previous page.
-- The query is ordered by the username field, so select all
-- rows after the cursor.
(username) > (
(LOWER(username)) > (
SELECT
username
LOWER(username)
FROM
users
WHERE
@@ -184,7 +184,7 @@ WHERE
-- End of filters
ORDER BY
-- Deterministic and consistent ordering of all users. This is to ensure consistent pagination.
username ASC OFFSET @offset_opt
LOWER(username) ASC OFFSET @offset_opt
LIMIT
-- A null limit means "no limit", so 0 means return all
NULLIF(@limit_opt :: int, 0);