mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
parent
6c446a96f2
commit
be5f79becc
@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "node-red-node-sqlite",
|
"name": "node-red-node-sqlite",
|
||||||
"version": "0.4.1",
|
"version": "0.4.2",
|
||||||
"description": "A sqlite node for Node-RED",
|
"description": "A sqlite node for Node-RED",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"sqlite3": "^4.1.0"
|
"sqlite3": "~4.1.1"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -14,7 +14,8 @@ module.exports = function(RED) {
|
|||||||
var node = this;
|
var node = this;
|
||||||
|
|
||||||
node.doConnect = function() {
|
node.doConnect = function() {
|
||||||
node.db = node.db || new sqlite3.Database(node.dbname,node.mode);
|
if (node.db) { return; }
|
||||||
|
node.db = new sqlite3.Database(node.dbname,node.mode);
|
||||||
node.db.on('open', function() {
|
node.db.on('open', function() {
|
||||||
if (node.tick) { clearTimeout(node.tick); }
|
if (node.tick) { clearTimeout(node.tick); }
|
||||||
node.log("opened "+node.dbname+" ok");
|
node.log("opened "+node.dbname+" ok");
|
||||||
|
Loading…
Reference in New Issue
Block a user