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

ORDER BY ... COLLATE LOCALIZED #144

Open
kr580vm80a opened this issue Apr 8, 2021 · 3 comments
Open

ORDER BY ... COLLATE LOCALIZED #144

kr580vm80a opened this issue Apr 8, 2021 · 3 comments

Comments

@kr580vm80a
Copy link

I had a need to embed the latest SQLite in my application. I have included your library and tried a simple query:

SELECT first_name
FROM clients
ORDER BY first_name COLLATE LOCALIZED

However, the data is sorted in the wrong order.
For example:

1.Євген
2.Андрій
3.Даніель
4.Орест

And it should be like this:

1.Андрій
2.Даніель
3.Євген
4.Орест

Does your framework support locales? I used "uk_UA". If so, what do I need to do to make the request sort the data in the correct order?

@mikehardy
Copy link
Contributor

This is kind of a self-service repository because it's a mostly boring repackage, I say that because you'll have to be ready to roll your sleeves up and figure it out

You might find this interesting

The "LOCALIZED" collation and some miscellaneous user-functions added by the
sqlite3_android.cpp module are not included. A collation called LOCALIZED
that is equivalent to BINARY is added instead to keep various things working.
This should not cause serious problems - class SQLiteConnection always
runs "REINDEX LOCALIZED" immediately after opening a connection.

...and maybe this to play around https://github.com/requery/sqlite-android/blob/master/sqlite-android/src/main/jni/sqlite/Android.mk

@kr580vm80a
Copy link
Author

Do you have an example of how this can be done? Thanks

@mikehardy
Copy link
Contributor

Sorry @kr580vm80a no idea, c.f.

This is kind of a self-service repository because it's a mostly boring repackage, I say that because you'll have to be ready to roll your sleeves up and figure it out

Not our use case, so no experience with it

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

2 participants