Skip to content

Commit 1ed204e

Browse files
author
Vavdiya
committed
added support for postgres queries
1 parent a5d22de commit 1ed204e

File tree

3 files changed

+689
-1
lines changed

3 files changed

+689
-1
lines changed

ConnectorIdentifier.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ function identifyConnection(json) {
1010
objConnection = require('./MySQLConnector.js');
1111
} else if (json.databaseType == "mssql") {
1212
objConnection = require('./MSSQLConnector.js');
13+
} else if (json.databaseType == "postgres") {
14+
objConnection = require('./PostgresConnector.js');
1315
}
1416
/*else if (json.databaseType == "mssql") {
1517
objConnection = require('./MSSQLConnector.js');

MySQLConnector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ function createInsert(arr) {
452452
subValueArr.push("null");
453453
}
454454
}
455-
if (tempJson.valueArr !== []) {
455+
if (tempJson.valueArr.length !== 0) {
456456
tempJson.valueArr.push('(' + subValueArr.join() + ')');
457457
} else {
458458
tempJson.valueArr.push(', (' + subValueArr.join() + ')');

0 commit comments

Comments
 (0)