Skip to content

Commit

Permalink
Improve non logging scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
mcartoixa committed Mar 18, 2016
1 parent debf1a6 commit c0c6c17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions lib/connect-tedious.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
/**
* Module dependencies.
*/

var tedious=require('tedious');
var tediousPool=require('tedious-connection-pool');
var retry=require('retry');
Expand All @@ -22,7 +21,7 @@ var debug={
var oneDay = 86400;

function debugSql(r) {
if (!r)
if (!r || !debug.sql.enabled)
return;

debug.sql('Executing '+r.sqlTextOrProcedure);
Expand All @@ -41,7 +40,7 @@ function debugSql(r) {
* @return {Function}
* @api public
*/
module.exports = function(connect){
module.exports = function(connect) {

/**
* Connect's Store.
Expand Down Expand Up @@ -204,7 +203,6 @@ module.exports = function(connect){
* @param {Function} fn
* @api public
*/

TediousStore.prototype.set = function(sid, sess, fn){
var self=this;

Expand Down Expand Up @@ -246,7 +244,7 @@ module.exports = function(connect){
* @param {String} sid
* @api public
*/
TediousStore.prototype.destroy = function(sid, fn){
TediousStore.prototype.destroy = function(sid, fn) {
var self=this;

var operation=retry.operation(self.retryOptions);
Expand Down Expand Up @@ -281,7 +279,7 @@ module.exports = function(connect){
* @param {Function} fn
* @api public
*/
TediousStore.prototype.length = function(fn){
TediousStore.prototype.length = function(fn) {
var self=this;

var operation=retry.operation(self.retryOptions);
Expand Down Expand Up @@ -322,7 +320,7 @@ module.exports = function(connect){
* @param {Function} fn
* @api public
*/
TediousStore.prototype.clear = function(fn){
TediousStore.prototype.clear = function(fn) {
var self=this;

var operation=retry.operation(self.retryOptions);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "connect-tedious",
"description": "Connect session store for SQL Server, using Tedious.",
"version": "1.1.1",
"version": "1.1.2",
"author": "Mathieu Cartoixa",
"main": "lib/connect-tedious",
"keywords": ["sql-server", "tds", "connection", "session", "store"],
Expand Down

0 comments on commit c0c6c17

Please sign in to comment.