Skip to content

Commit

Permalink
Merge pull request #17 from wmertens/patch-1
Browse files Browse the repository at this point in the history
Use WAL mode for the database
  • Loading branch information
rawberg authored Apr 27, 2018
2 parents ca2b8a8 + 2b13b60 commit 259c084
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/connect-sqlite3.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module.exports = function(connect) {
this.client = new events.EventEmitter();
var self = this;

this.db.exec('CREATE TABLE IF NOT EXISTS ' + this.table + ' (' + 'sid PRIMARY KEY, ' + 'expired, sess)',
this.db.exec((options.concurrentDb ? 'PRAGMA journal_mode = wal; ' : '') + 'CREATE TABLE IF NOT EXISTS ' + this.table + ' (' + 'sid PRIMARY KEY, ' + 'expired, sess)',
function(err) {
if (err) throw err;
self.client.emit('connect');
Expand Down

0 comments on commit 259c084

Please sign in to comment.