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",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"description": "A sqlite node for Node-RED",
|
||||
"dependencies": {
|
||||
"sqlite3": "^4.1.0"
|
||||
"sqlite3": "~4.1.1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -14,7 +14,8 @@ module.exports = function(RED) {
|
||||
var node = this;
|
||||
|
||||
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() {
|
||||
if (node.tick) { clearTimeout(node.tick); }
|
||||
node.log("opened "+node.dbname+" ok");
|
||||
|
Loading…
Reference in New Issue
Block a user