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
custom COLLATE #4974
Comments
Have you already tried the icu extension and the Collation editor menu option? |
Hi. Thank you for you reply. I have ICU extension installed and and have Collation Editor in the menus. Thankfully I then went to sqlite documentation, specifically to ICU readme file, and found out about
which created collation named However, as I restarted the program it told me Is there a way to make a collation created with Please, advise. |
No.
I don't think it's supported. Probably in your simple case a simple JavaScript collation definition would be enough (but probably much slower than ICU):
|
Hi.
By default SQLite sorting doesn't account for accented letters (ie. Polish letters: Ł, Ś, Ź..,) and if a string begins with one, ORDER BY ASC clause always puts those at the very end, which is a game breaker for me.
Is it possible to create a custom function to account for accented letters to use it as a COLLATE method and with the custom sorting functionality of the UI (ie. double-clicking on column header)?
So far I've only managed to create a simple javascript function which replaces all the accented letters in a string with ASCII non-accented equivalents, which then I can use in ORDER BY clause, but although it is somewhat helpful (values starting with accented letters are no longer at the end of the sorted list), it is far from optimal, because sorting still isn't correct and I tried using the function in the COLLATE clause, but it doesn't work.
And I can't find any documentation showing how to create javascript custom collate methods, or if that is even possible.
I'm using SQLiteStudio in Windows as a standalone DB manager for storing and managing data.
Perhaps there is an extension already to fix my issue.
Thank you in advance.
The text was updated successfully, but these errors were encountered: