zeanium-node
Advanced tools
Comparing version 0.6.2 to 0.6.3
{ | ||
"name": "zeanium-node", | ||
"version": "0.6.2", | ||
"version": "0.6.3", | ||
"description": "Zeanium for Node.js, simple http server and custome your business.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -45,16 +45,20 @@ /** | ||
} | ||
return this.__query(_sql); | ||
}, | ||
__query: function (sql, config){ | ||
var _defer = zn.async.defer(), | ||
_config = config || this._config; | ||
zn.debug('ConnectionPool query: ' + sql); | ||
require('mysql').createConnection(_config).query(sql, function (err, rows){ | ||
if(err){ | ||
zn.error(err.stack); | ||
_defer.reject(err); | ||
}else { | ||
_defer.resolve(rows); | ||
} | ||
__query: function (sql){ | ||
var _defer = zn.async.defer(); | ||
this.__getNativeConnection(function (connection){ | ||
zn.debug('ConnectionPool query: ' + sql); | ||
connection.query(sql, function (err, rows){ | ||
if(err){ | ||
zn.error('ConnectionPool connection query error: ', err.stack); | ||
console.log(err.stack); | ||
_defer.reject(err); | ||
}else { | ||
_defer.resolve(rows); | ||
} | ||
}); | ||
}, function (err){ | ||
_defer.reject(err); | ||
}); | ||
@@ -67,3 +71,4 @@ | ||
if (err){ | ||
zn.error(err.message); | ||
zn.error('ConnectionPool getConnection error: ', err.message); | ||
console.log(err.stack); | ||
error && error(err); | ||
@@ -70,0 +75,0 @@ }else { |
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
249337
5919