sqlite small doc update, and bump dep library

This commit is contained in:
Dave Conway-Jones 2018-12-19 19:37:13 +00:00
parent ca0b01d10e
commit 2ca330fcb8
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
3 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,7 @@ Install
Run the following command in your Node-RED user directory - typically `~/.node-red` Run the following command in your Node-RED user directory - typically `~/.node-red`
npm install node-red-node-sqlite npm i --unsafe-perm node-red-node-sqlite
Usage Usage

View File

@ -1,9 +1,9 @@
{ {
"name": "node-red-node-sqlite", "name": "node-red-node-sqlite",
"version": "0.3.5", "version": "0.3.6",
"description": "A sqlite node for Node-RED", "description": "A sqlite node for Node-RED",
"dependencies": { "dependencies": {
"sqlite3": "^4.0.2" "sqlite3": "^4.0.4"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -106,7 +106,7 @@ module.exports = function(RED) {
if (node.sqlquery == "prepared"){ if (node.sqlquery == "prepared"){
if (typeof node.sql === 'string' && typeof msg.params !== "undefined" && typeof msg.params === "object") { if (typeof node.sql === 'string' && typeof msg.params !== "undefined" && typeof msg.params === "object") {
if (node.sql.length > 0) { if (node.sql.length > 0) {
node.mydbConfig.db.all(node.sql, msg.params, function(err, row) { node.mydbConfig.db.all(node.sql, msg.params, function(err, row) {
if (err) { node.error(err,msg); } if (err) { node.error(err,msg); }
else { else {
msg.payload = row; msg.payload = row;