A whole bunch of whitespace linting - no functional changes

This commit is contained in:
Dave Conway-Jones
2019-08-11 13:37:15 +01:00
parent 8e2352b08a
commit e20cf97fce
20 changed files with 154 additions and 184 deletions

View File

@@ -49,7 +49,7 @@ module.exports = function(RED) {
var bind = [];
var doQuery = function(msg) {
if (node.sqlquery == "msg.topic"){
if (node.sqlquery == "msg.topic") {
if (typeof msg.topic === 'string') {
if (msg.topic.length > 0) {
bind = Array.isArray(msg.payload) ? msg.payload : [];
@@ -84,7 +84,7 @@ module.exports = function(RED) {
node.status({fill:"red", shape:"dot",text:"msg.topic error"});
}
}
if (node.sqlquery == "fixed"){
if (node.sqlquery == "fixed") {
if (typeof node.sql === 'string') {
if (node.sql.length > 0) {
node.mydbConfig.db.all(node.sql, bind, function(err, row) {
@@ -96,14 +96,14 @@ module.exports = function(RED) {
});
}
}
else{
else {
if (node.sql === null || node.sql == "") {
node.error("SQL statement config not set up",msg);
node.status({fill:"red",shape:"dot",text:"SQL config not set up"});
}
}
}
if (node.sqlquery == "prepared"){
if (node.sqlquery == "prepared") {
if (typeof node.sql === 'string' && typeof msg.params !== "undefined" && typeof msg.params === "object") {
if (node.sql.length > 0) {
node.mydbConfig.db.all(node.sql, msg.params, function(err, row) {