Comparing version 0.6.6 to 0.6.7
@@ -662,2 +662,19 @@ /* | ||
//proxy the ODBCResult fetch function so that it is queued | ||
odbc.ODBCResult.prototype._fetch = odbc.ODBCResult.prototype.fetch; | ||
odbc.ODBCResult.prototype.fetch = function (cb) { | ||
var self = this; | ||
self.queue = self.queue || new SimpleQueue(); | ||
self.queue.push(function (next) { | ||
self._fetch(function (err, data) { | ||
if (cb) cb(err, data); | ||
return next(); | ||
}); | ||
}); | ||
}; | ||
module.exports.Pool = Pool; | ||
@@ -667,3 +684,3 @@ | ||
function Pool () { | ||
function Pool (options) { | ||
var self = this; | ||
@@ -674,2 +691,4 @@ self.index = Pool.count++; | ||
self.odbc = new odbc.ODBC(); | ||
self.options = options || {} | ||
self.options.odbc = self.odbc; | ||
} | ||
@@ -690,3 +709,3 @@ | ||
else { | ||
db = new Database({ odbc : self.odbc }); | ||
db = new Database(self.options); | ||
db.realClose = db.close; | ||
@@ -693,0 +712,0 @@ |
{ | ||
"name": "odbc", | ||
"description": "unixodbc bindings for node", | ||
"version": "0.6.6", | ||
"version": "0.6.7", | ||
"main": "lib/odbc.js", | ||
@@ -6,0 +6,0 @@ "homepage": "http://github.com/wankdanker/node-odbc/", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
111
3181
288873