File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ SQLiteDB.prototype.getDefaultIdType = function () {
7878SQLiteDB . prototype . connect = function ( callback ) {
7979 callback = bindDomain ( process . domain , callback ) ;
8080 var self = this ;
81- var file_name = ( ( self . file_name !== null ) ? self . file_name : ":memory:" ) ;
81+ var file_name = SQLiteDB . prototype . file_name = ( ( self . file_name !== null ) ? self . file_name : ":memory:" ) ;
8282 var err = null ;
8383 if ( self . client === undefined ) {
8484 self . client = new self . sqlite3 . Database ( file_name , self . sqlite3 . OPEN_READWRITE | self . sqlite3 . OPEN_CREATE , function ( error ) {
Original file line number Diff line number Diff line change @@ -10,8 +10,10 @@ module.exports = mixinTransactions;
1010
1111function mixinTransactions ( SQLiteDB ) {
1212
13+ var self = SQLiteDB ;
14+
1315 SQLiteDB . prototype . beginTransaction = ( isolation , cb ) => {
14- var db = new TransactionDatabase ( new sqlite3 . Database ( ":memory:" , sqlite3 . OPEN_READWRITE | sqlite3 . OPEN_CREATE ) ) ;
16+ var db = new TransactionDatabase ( new sqlite3 . Database ( self . prototype . file_name , sqlite3 . OPEN_READWRITE | sqlite3 . OPEN_CREATE ) ) ;
1517 return db . beginTransaction ( cb ) ;
1618 }
1719
You can’t perform that action at this time.
0 commit comments