From d72e2d79f6b12b72416086f56383734fdb4a1a84 Mon Sep 17 00:00:00 2001 From: dave preston Date: Thu, 6 Jun 2019 17:07:17 -0700 Subject: [PATCH] refactor: unused/unneeded references --- lib/adapter.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/adapter.js b/lib/adapter.js index b02d954..6392097 100644 --- a/lib/adapter.js +++ b/lib/adapter.js @@ -1,5 +1,4 @@ var _ = require('lodash'); -var mssql = require('mssql'); var Query = require('./query'); var sql = require('./sql.js'); var utils = require('./utils'); @@ -12,7 +11,6 @@ var moment = require("moment"); var registeredDatastores = {}; -var definitions = {}; let awaitableCreate; // TODO: Not the same as utils (which is stored in a separate file. need to refactor to same one.) var util = { @@ -596,7 +594,6 @@ var adapter = { tableName = '[' + schemaName + ']' + '.[' + tableName + ']'; var statement = 'DELETE FROM ' + tableName + ' '; statement += sql.serializeOptions(tableName, query.criteria); - var find = Promise.promisify(adapter.find); // if (meta && meta.fetch) { let records; if (meta && meta.fetch) { @@ -1072,10 +1069,9 @@ var adapter = { }); delete wlQuery.joins; } - var find = Promise.promisify(adapter.find); var promises = {}; - promises[tableName] = find(datastoreName, { using: tableName, criteria }); + promises[tableName] = adapter.find(datastoreName, { using: tableName, criteria }); promises[tableName] .then(function (topLevelResults) {