Skip to content
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

Support locale-aware ORDER BY #50

Open
agladysh opened this issue Sep 23, 2024 · 0 comments
Open

Support locale-aware ORDER BY #50

agladysh opened this issue Sep 23, 2024 · 0 comments

Comments

@agladysh
Copy link

Is there a way to get a locale-correct row order with RBQL?

çilek
erik
şeftali
armut
üzüm

RBQL:

SELECT a1 ORDER BY a1 ASC

Expected (correct for the tr locale):

armut
çilek
erik
şeftali
üzüm

Actual:

armut
erik
çilek
üzüm
şeftali

Judging from the source, RBQL does simple comparison of values when sorting.

In case of JS, in locale-aware sort RBQL would call String.localeCompare() on a values with a provided locale (and, potentially, options), instead of using the < operator.

This should probably be optional behavior, as (1) locale is query-specific and complicated, and (2) it would incur a performance penalty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant