1
0

Disable FTS

This commit is contained in:
Zef Hemel 2022-10-17 16:28:23 +02:00
parent c2ccd2a6a1
commit e7a240127c

View File

@ -11,18 +11,18 @@ export function ensureFTSTable(
db: SQLite,
tableName: string,
) {
const stmt = db.prepare(
`SELECT name FROM sqlite_master WHERE type='table' AND name=?`,
);
const result = stmt.all(tableName);
if (result.length === 0) {
asyncExecute(
db,
`CREATE VIRTUAL TABLE ${tableName} USING fts5(key, value);`,
);
// const stmt = db.prepare(
// `SELECT name FROM sqlite_master WHERE type='table' AND name=?`,
// );
// const result = stmt.all(tableName);
// if (result.length === 0) {
// asyncExecute(
// db,
// `CREATE VIRTUAL TABLE ${tableName} USING fts5(key, value);`,
// );
console.log(`Created fts5 table ${tableName}`);
}
// console.log(`Created fts5 table ${tableName}`);
// }
return Promise.resolve();
}