Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

Commit

Permalink
refactor: unused/unneeded references
Browse files Browse the repository at this point in the history
  • Loading branch information
davepreston committed Jun 7, 2019
1 parent 36747d6 commit d72e2d7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/adapter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var _ = require('lodash');
var mssql = require('mssql');
var Query = require('./query');
var sql = require('./sql.js');
var utils = require('./utils');
Expand All @@ -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 = {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit d72e2d7

Please sign in to comment.