execs must be awaited

This commit is contained in:
Test 2024-09-04 14:48:37 -07:00
parent 8b57d298dd
commit a312b6debe
4 changed files with 5 additions and 5 deletions

View file

@ -20,7 +20,7 @@ export class AutocompleteLruCache {
driver: sqlite3.Database,
});
db.exec("PRAGMA busy_timeout = 3000;");
await db.exec("PRAGMA busy_timeout = 3000;");
await db.run(`
CREATE TABLE IF NOT EXISTS cache (

View file

@ -475,7 +475,7 @@ export default class DocsService {
driver: sqlite3.Database,
});
db.exec("PRAGMA busy_timeout = 3000;");
await db.exec("PRAGMA busy_timeout = 3000;");
await runSqliteMigrations(db);

View file

@ -92,7 +92,7 @@ export class SqliteDb {
driver: sqlite3.Database,
});
SqliteDb.db.exec("PRAGMA busy_timeout = 3000;");
await SqliteDb.db.exec("PRAGMA busy_timeout = 3000;");
await SqliteDb.createTables(SqliteDb.db);

View file

@ -79,8 +79,8 @@ export class DevDataSqliteDb {
driver: sqlite3.Database,
});
DevDataSqliteDb.db.exec("PRAGMA busy_timeout = 3000;");
await DevDataSqliteDb.db.exec("PRAGMA busy_timeout = 3000;");
await DevDataSqliteDb.createTables(DevDataSqliteDb.db!);
return DevDataSqliteDb.db;