MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / hasFtsTable

Function hasFtsTable

packages/node-runtime/src/fts/index.ts:17–24  ·  view source on GitHub ↗
(db: DatabaseAdapter)

Source from the content-addressed store, hash-verified

15 * Check if FTS virtual table exists in the database.
16 */
17export function hasFtsTable(db: DatabaseAdapter): boolean {
18 try {
19 const row = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='message_fts'").get()
20 return !!row
21 } catch {
22 return false
23 }
24}
25
26/**
27 * Create FTS virtual table if it doesn't exist.

Callers 5

incrementalImportFunction · 0.90
getFtsStatusFunction · 0.90
hasFtsIndexFunction · 0.90
rebuildFtsIndexFunction · 0.85
insertFtsEntriesFunction · 0.85

Calls 2

getMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected