lint
This commit is contained in:
977 files changed
+198426
-158324
No files matched your search
@@ -13,10 +13,10 @@ import { DatabaseSync } from 'node:sqlite';
|
||||
* three.
|
||||
*/
|
||||
export function openSqliteDb(dbPath: string): DatabaseSync {
|
||||
fs.mkdirSync(path.dirname(dbPath), { recursive: true });
|
||||
const db = new DatabaseSync(dbPath);
|
||||
db.exec('PRAGMA journal_mode = WAL');
|
||||
db.exec('PRAGMA synchronous = NORMAL');
|
||||
db.exec('PRAGMA busy_timeout = 1000');
|
||||
return db;
|
||||
fs.mkdirSync(path.dirname(dbPath), { recursive: true });
|
||||
const db = new DatabaseSync(dbPath);
|
||||
db.exec('PRAGMA journal_mode = WAL');
|
||||
db.exec('PRAGMA synchronous = NORMAL');
|
||||
db.exec('PRAGMA busy_timeout = 1000');
|
||||
return db;
|
||||
}
|
||||
Reference in new issue
Block a user