SQLite Forum

rowid adjustment in contentless FTS5 tables
Login

rowid adjustment in contentless FTS5 tables

(1) By rokups on 2020-09-20 11:29:48 [source]

Hello,

I am looking into using SQLite for implementing full text search in tabular data editor. This sounds about perfect, row in the table == rowid in sqlite virtual table. But i also need to be able to insert or delete new rows. SQLite does not shift rowid when these operations happen (and for a good reason i bet). Deleting items would leave gaps in sequence of rowids, inserting new items would produce multiple matches with same rowid. My assumption that rowid == number of row in the table breaks here.

Would you please advice me here? Did i miss any obvious functionality of FTS5? Or is there some reasonable workaround? Or is FTS5 completely unsuited for my usecase?

Thanks!