Comparing version 0.1.8-11 to 0.1.8-12
@@ -225,3 +225,3 @@ var mysql = require("mysql"); | ||
escape: this._escapeId, | ||
info: helpers.escapeInsertFields(data, this._helperOpts), | ||
info: helpers.escapeInsertFields(data, this._helperOpts()), | ||
orm: this._orm, | ||
@@ -239,3 +239,3 @@ data: data, | ||
escape: this._escapeId, | ||
info: helpers.escapeUpdateFields(data, this._escapeId, this._helperOpts), | ||
info: helpers.escapeUpdateFields(data, this._escapeId, this._helperOpts()), | ||
db: this._client, | ||
@@ -246,3 +246,3 @@ callback: cb | ||
DBClient.prototype._addQueryConditions = function (conditions) { | ||
return helpers.buildSqlWhere(conditions, this._escapeId, this._helperOpts); | ||
return helpers.buildSqlWhere(conditions, this._escapeId, this._helperOpts()); | ||
}; | ||
@@ -252,6 +252,8 @@ DBClient.prototype._collectionToTable = function (collection) { | ||
}; | ||
DBClient.prototype._helperOpts = { | ||
date_convert_fmt: "FROM_UNIXTIME(?)", | ||
additional_operators: [ "LIKE", "ILIKE" ], | ||
boolean_convert: this._booleanToSqlValue | ||
DBClient.prototype._helperOpts = function () { | ||
return { | ||
date_convert_fmt: "FROM_UNIXTIME(?)", | ||
additional_operators: [ "LIKE", "ILIKE" ], | ||
boolean_convert: this._booleanToSqlValue | ||
}; | ||
}; | ||
@@ -258,0 +260,0 @@ DBClient.prototype._booleanToSqlValue = function (value) { |
@@ -254,3 +254,3 @@ var util = require("util"); | ||
escape: this._escapeId, | ||
info: helpers.escapeInsertFields(data, this._helperOpts), | ||
info: helpers.escapeInsertFields(data, this._helperOpts()), | ||
orm: this._orm, | ||
@@ -282,3 +282,3 @@ data: data, | ||
escape: this._escapeId, | ||
info: helpers.escapeUpdateFields(data, this._escapeId, this._helperOpts), | ||
info: helpers.escapeUpdateFields(data, this._escapeId, this._helperOpts()), | ||
db: this._client, | ||
@@ -289,3 +289,3 @@ callback: cb | ||
DBClient.prototype._addQueryConditions = function (conditions) { | ||
return helpers.buildSqlWhere(conditions, this._escapeId, this._helperOpts); | ||
return helpers.buildSqlWhere(conditions, this._escapeId, this._helperOpts()); | ||
}; | ||
@@ -295,7 +295,9 @@ DBClient.prototype._collectionToTable = function (collection) { | ||
}; | ||
DBClient.prototype._helperOpts = { | ||
additional_operators: [ "LIKE", "ILIKE" ], | ||
date_convert_fmt: "TO_TIMESTAMP(?)::timestamp", | ||
boolean_convert: this._booleanToSqlValue, | ||
tokenCb: function (n) { return '$' + n; } | ||
DBClient.prototype._helperOpts = function () { | ||
return { | ||
additional_operators: [ "LIKE", "ILIKE" ], | ||
date_convert_fmt: "TO_TIMESTAMP(?)::timestamp", | ||
boolean_convert: this._booleanToSqlValue, | ||
tokenCb: function (n) { return '$' + n; } | ||
}; | ||
}; | ||
@@ -302,0 +304,0 @@ DBClient.prototype._booleanToSqlValue = function (value) { |
{ | ||
"name" : "orm", | ||
"version" : "0.1.8-11", | ||
"version" : "0.1.8-12", | ||
"description" : "NodeJS Object-relational mapping", | ||
@@ -5,0 +5,0 @@ "keywords" : [ |
92668
2739