From 98795213fc23a07c3a5e7aae0050de301b342db2 Mon Sep 17 00:00:00 2001 From: Amir Jafarian Date: Tue, 12 Jan 2016 13:22:37 -0500 Subject: [PATCH] Change _buildUpdate to buildUpdate --- lib/connector.js | 1 - lib/sql.js | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/connector.js b/lib/connector.js index bd706c0..8b7106a 100644 --- a/lib/connector.js +++ b/lib/connector.js @@ -271,7 +271,6 @@ Connector.defineAliases = function(cls, methodOrPropertyName, aliases) { */ Connector.defineAliases(Connector.prototype, 'execute', ['command', 'query']); -Connector.defineAliases(Connector.prototype, '_buildUpdate', 'buildUpdate'); diff --git a/lib/sql.js b/lib/sql.js index 3ef8bba..f4eea9d 100644 --- a/lib/sql.js +++ b/lib/sql.js @@ -623,7 +623,7 @@ SQLConnector.prototype._buildWhereObjById = function(model, id, data) { * @param {Function} cb The callback function * @returns {ParameterizedSQL} The UPDATE SQL statement */ -SQLConnector.prototype._buildUpdate = function(model, where, data, options) { +SQLConnector.prototype.buildUpdate = function(model, where, data, options) { var fields = this.buildFieldsForUpdate(model, data); return this._constructUpdateQuery(model, where, fields); }; @@ -666,7 +666,7 @@ SQLConnector.prototype._constructUpdateQuery = function(model, where, fields) { * @param {Function} cb The callback function */ SQLConnector.prototype.update = function(model, where, data, options, cb) { - var stmt = this._buildUpdate(model, where, data, options); + var stmt = this.buildUpdate(model, where, data, options); this._executeAlteringQuery(model, stmt.sql, stmt.params, options, cb || NOOP); };