Created
October 28, 2024 10:16
-
-
Save channprj/77c10a81dba6bd82e6f751b677218854 to your computer and use it in GitHub Desktop.
DB Collate with Django ORM
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
# Use ko_KR.utf8 for lower version of Postgres | |
# ex: select * from sample_table order by "name" COLLATE "ko-KR-x-icu"; | |
ko_name = Func("name", function="ko-KR-x-icu", template='(%(expressions)s) COLLATE "%(function)s"') | |
queryset = queryset.order_by(ko_name.asc()) |
Author
channprj
commented
Oct 28, 2024
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment