mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-03-10 05:28:10 +00:00
Turn on WAL mode for better-sqlite3
This commit is contained in:
parent
9ba4556250
commit
cc4cb04900
@ -43,6 +43,11 @@ function SqlEngine(options) {
|
|||||||
this.db = new Database(databasePath,{
|
this.db = new Database(databasePath,{
|
||||||
verbose: undefined && console.log
|
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() {
|
SqlEngine.prototype.close = function() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user