I have an SQLite database where a column is called i18n
and contains a JSON tree where some localized strings are contained.
For example:
{"gr":{"name":"NAME_IN_GR"},"ru":{"name":"NAME_IN_RU"}}
Now I should make a search for a partial string typed by the user inside the name
node of a passed localization.
My initial attempt is to use a regular expression but I'm afraid it could be a bit slower (everything should happens while user is typing, even if the operation is throttled).
Now I'm considering two other ways:
- create a virtual table using FTS? How it works?
- alter/make a copy of the db where these fields are splitted inside their own columns (ie
RU
,GR
,IT
and so on).
What's your suggestion and a simple implementation?