1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-03-09 21:18:11 +00:00

Turn on WAL mode for better-sqlite3

This commit is contained in:
Jeremy Ruston 2024-04-14 19:12:21 +01:00
parent 9ba4556250
commit cc4cb04900

View File

@ -43,6 +43,11 @@ function SqlEngine(options) {
this.db = new Database(databasePath,{
verbose: undefined && console.log
});
// Turn on WAL mode for better-sqlite3
if(this.engine === "better") {
// See https://github.com/WiseLibs/better-sqlite3/blob/master/docs/performance.md
this.db.pragma("journal_mode = WAL");
}
}
SqlEngine.prototype.close = function() {