Skip to content

Commit 8f14422

Browse files
author
Manuel Ortiz
committed
delete hardcore database name
1 parent 60f8447 commit 8f14422

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/sqlite3db.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ SQLiteDB.prototype.getDefaultIdType = function () {
7878
SQLiteDB.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){

lib/transactions.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ module.exports = mixinTransactions;
1010

1111
function 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

0 commit comments

Comments
 (0)