any-db-pool
Advanced tools
Comparing version 2.0.0 to 2.0.1
11
index.js
@@ -27,3 +27,3 @@ var inherits = require('util').inherits | ||
if (connParams.adapter == 'sqlite3' | ||
if (adapter.name == 'sqlite3' | ||
&& /:memory:$/i.test(connParams.database) | ||
@@ -62,4 +62,3 @@ && (options.min > 1 || options.max > 1)) | ||
if (options.reset) resetSteps.unshift(options.reset) | ||
this.adapter = adapter.name | ||
this._adapter = adapter | ||
this.adapter = adapter | ||
this._reset = chain(resetSteps) | ||
@@ -69,9 +68,5 @@ this._pool = new Pool(poolOpts) | ||
ConnectionPool.prototype.createQuery = function (statement, params, callback) { | ||
return this._adapter.createQuery(statement, params, callback) | ||
} | ||
ConnectionPool.prototype.query = function (statement, params, callback) { | ||
var self = this | ||
, query = this.createQuery(statement, params, callback) | ||
, query = this.adapter.createQuery(statement, params, callback) | ||
@@ -78,0 +73,0 @@ this.acquire(function (err, conn) { |
{ | ||
"name": "any-db-pool", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Any-DB connection pool", | ||
@@ -24,5 +24,5 @@ "main": "index.js", | ||
"tape": "~2.3.2", | ||
"any-db-fake": "~0.0.2", | ||
"any-db-fake": "~0.0.3", | ||
"covert": "~0.1.1" | ||
} | ||
} |
@@ -11,11 +11,10 @@ var test = require('tape') | ||
var connParams = { | ||
adapter: 'sqlite3', | ||
database: ':memory:', | ||
} | ||
ConnectionPool(mockAdapter(), connParams, {min: 3}).close() | ||
ConnectionPool(mockAdapter(), connParams, {max: 3}).close() | ||
var adapter = mockAdapter({name: 'sqlite3'}) | ||
var connParams = {database: ':memory:'} | ||
ConnectionPool(adapter, connParams, {min: 3}).close() | ||
ConnectionPool(adapter, connParams, {max: 3}).close() | ||
console.warn = warn | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17844
361