zdavatz / AmiKo-iOS

AmiKo Desitin für iPhone und iPad
https://apps.apple.com/ch/app/amiko-desitin/id687642725
GNU General Public License v3.0
1 stars 2 forks source link

Do "diacritic insensitive" searches for titles in the DB #89

Closed zdavatz closed 4 years ago

zdavatz commented 5 years ago

See: https://github.com/zdavatz/aips2sqlite/issues/3

zdavatz commented 4 years ago

this issue could also have been solved using NSPredicate API this has been recommended by @bettar, i.e.: https://github.com/bettar/miele-lxiv/blob/lxiv/OsiriXClasses/Web/WebPortalConnection%2BData.mm#L262

b123400 commented 4 years ago

I think NSPredicate API is not suitable for searching data in database. If we use it, we will have to load the entire database and match them one by one in memory, which is slow, use more memory and cannot take advantage of Sqlite's ability. My solution of using GLOB and SQL means we can have the similar code across iOS/Android/Csharp etc, which IMO is better.