sqlite-android icon indicating copy to clipboard operation
sqlite-android copied to clipboard

ORDER BY ... COLLATE LOCALIZED

Open kr580vm80a opened this issue 3 years ago • 3 comments

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?

kr580vm80a avatar Apr 08 '21 19:04 kr580vm80a

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

https://github.com/requery/sqlite-android/blob/25c5d9e87f92c22634d4b924f15d12198889d81f/sqlite-android/src/main/jni/sqlite/README#L27-L31

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

mikehardy avatar Apr 08 '21 20:04 mikehardy

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

kr580vm80a avatar Apr 09 '21 13:04 kr580vm80a

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

mikehardy avatar Apr 09 '21 13:04 mikehardy