Метка «SQLite cusom function»

SELECT * WHERE LOWER_FNC(name) like '%" + filterText + "%'"

При разработке Android приложения столкнулся с проблемой в запросе SQLite фильтра с русскими буквами. Для английской локализации проблем нет. Для других интернациональных раскладок некорректно обрабатывались заглавные буквы в запросе.
Немного разобравшись я наткнулся на следующее описание:

(18) Case-insensitive matching of Unicode characters does not work.

The default configuration of SQLite only supports case-insensitive comparisons of ASCII characters. The reason for this is that doing full Unicode case-insensitive comparisons and case conversions requires tables and logic that would nearly double the size of the SQLite library. The SQLite developers reason that any application that needs full Unicode case support probably already has the necessary tables and functions and so SQLite should not take up space to duplicate this ability.

Instead of providing full Unicode case support by default, SQLite provides the ability to link against external Unicode comparison and conversion routines.

Вероятно текущая реализация SQLite Android и есть

only supports case-insensitive comparisons of ASCII characters

Видел решение через CursorWrapper но решил все таки собрать свою версию SQLite и использовать addCustomFunction

Что из этого получилось читайте под катом
Читать полностью »


https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js