Skip to content

Document and validate FTS5 idsfind DB requirements for sqlite-wasm backends #32

Description

@mandel59

Context

@sqlite.org/sqlite-wasm supports FTS5, but it does not support the FTS4 module used by the existing @mandel59/idsdb idsfind.db.

During mojidata-web-app integration, the sqlite-wasm OPFS backend needed the FTS5 database from @mandel59/idsdb-fts5 instead of the legacy FTS4 @mandel59/idsdb asset.

Problem

The backend requirement is easy to miss. Passing an FTS4 idsfind.db to sqlite-wasm fails only after SQLite tries to open/query the virtual table, which makes the integration error less obvious.

Proposed fix

  • Document that sqlite-wasm idsfind requires @mandel59/idsdb-fts5.
  • Consider making @mandel59/idsdb-fts5 an explicit dependency or peer dependency of the sqlite-wasm integration package.
  • Add schema/version validation for idsfind DBs used by sqlite-wasm.
  • Produce a clear error when an FTS4 idsfind DB is supplied to an FTS5-only backend.

Acceptance criteria

  • sqlite-wasm docs mention the FTS5 requirement and package name.
  • Tests cover successful use with @mandel59/idsdb-fts5.
  • Tests cover a clear failure with the FTS4 @mandel59/idsdb DB.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions