[Gambas-user] sqlite full text search i.e. virtual tables
BB
adamnt42 at gmail.com
Sat Sep 2 15:17:56 CEST 2023
On 2/9/23 10:20 pm, Benoît Minisini wrote:
> Le 02/09/2023 à 08:16, BB a écrit :
>> Do we support queries on sqlite virtual tables? I am trying to
>> implement a full text search on names in 3 tables. sqlite3 has a full
>> text search (FTS) facility that seems to work quite well after
>> limited testing* but I can't seem to get access to it via gb.db
>> conn.Find() or conn.Exec().
>>
>> The info on sqlite FTS can be found here
>> <https://www.sqlite.org/fts5.html>.
>>
>> Any clues?
>>
>> tia
>>
>> Bruce
>>
>> * I can add, delete and change the base tables and can successfully
>> "update" the FTS "table". Queries executed outside Gambas work fine.
>> The search table has two columns, name and type where type is
>> "person", "building", "place". A simple query on the FTS would be
>> something like "SELECT * FROM namesrch WHERE name MATCH 'Haricot';"
>>
>
> The Exec() method allows you to run any SQL request, so I don't see
> why you couldn't use this SQLite extension.
>
> Regards,
>
Aaaargh! 3 hours ago it didn't work, now it does.
It was raising an error that the table ("namesrch") did not exist, hence
my post. Now, after dinner and a bit of TV, I came back and just before
closing the project concerned tried it again.
...
Are you some kind of sorcerer or something 😅
bests
b
More information about the User
mailing list