forked from darshit-shah/node-database-connectors
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConnectorIdentifier.js
More file actions
28 lines (26 loc) · 853 Bytes
/
ConnectorIdentifier.js
File metadata and controls
28 lines (26 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
exports.identify = function () {
return identifyConnection(arguments[0]);
}
function identifyConnection(json) {
var objConnection = null;
if (json.type == 'database') {
if (json.databaseType == "mysql") {
objConnection = require('./MySQLConnector.js');
}
else if (json.databaseType == "mssql") {
objConnection = require('./MSSQLConnector.js');
}
/*else if (json.databaseType == "mssql") {
objConnection = require('./MSSQLConnector.js');
}
else if (json.databaseType == "elasticsearch") {
objConnection = require('./ElasticSearchConnector.js');
}
else if (json.databaseType == "bigquery") {
objConnection = require('./bigQueryConnector.js');
}*/
}
else {
}
return objConnection;
}