mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-03-14 02:33:09 -07:00
Turn on WAL mode for better-sqlite3
This commit is contained in:
parent
9ba4556250
commit
cc4cb04900
1 changed files with 5 additions and 0 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue