Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-red-node-mysql

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-node-mysql - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

29

68-mysql.js

@@ -116,16 +116,23 @@

var bind = [];
if (Array.isArray(msg.payload)) { bind = msg.payload; }
if (Array.isArray(msg.payload)) {
bind = msg.payload;
node.mydbConfig.pool.on('acquire', function(connection) {
connection.config.queryFormat = null;
});
}
else if (typeof msg.payload === 'object' && msg.payload !== null) {
bind = msg.payload;
node.mydbConfig.pool.config.queryFormat = function(query, values) {
if (!values) {
return query;
}
return query.replace(/\:(\w+)/g, function(txt, key) {
if (values.hasOwnProperty(key)) {
return this.escape(values[key]);
node.mydbConfig.pool.on('acquire', function(connection) {
connection.config.queryFormat = function(query, values) {
if (!values) {
return query;
}
return txt;
}.bind(this));
};
return query.replace(/\:(\w+)/g, function(txt, key) {
if (values.hasOwnProperty(key)) {
return this.escape(values[key]);
}
return txt;
}.bind(this));
};
});
}

@@ -132,0 +139,0 @@ node.mydbConfig.pool.query(msg.topic, bind, function(err, rows) {

{
"name": "node-red-node-mysql",
"version": "0.2.1",
"version": "0.2.2",
"description": "A Node-RED node to read and write to a MySQL database",

@@ -5,0 +5,0 @@ "dependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc