How to use node-red-contrib-viseo-nosql-manager - 10 common examples

To help you get started, we’ve selected a few node-red-contrib-viseo-nosql-manager examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NGRP / node-red-contrib-viseo / node-red-contrib-nosql / node-handover.js View on Github external
'use strict';

const helper                = require('node-red-viseo-helper');
const DbSelectorFactory     = require('./lib/database-selector.js');
const databaseRegistry      = require('node-red-contrib-viseo-nosql-manager').dbRegistry;
const DatabaseManager       = require('node-red-contrib-viseo-nosql-manager').DbManager;


// --------------------------------------------------------------------------
//  LOGS
// --------------------------------------------------------------------------


// --------------------------------------------------------------------------
//  NODE-RED
// --------------------------------------------------------------------------

module.exports = function(RED) {

    const register = function(config) {
        RED.nodes.createNode(this, config);
        var node = this;
github NGRP / node-red-contrib-viseo / node-red-contrib-nosql / node-nosql.js View on Github external
'use strict';

const helper                = require('node-red-viseo-helper');
const extend                = require('extend');
const DbSelectorFactory     = require('./lib/database-selector.js');
const databaseRegistry      = require('node-red-contrib-viseo-nosql-manager').dbRegistry;
const DatabaseManager       = require('node-red-contrib-viseo-nosql-manager').DbManager;


// --------------------------------------------------------------------------
//  LOGS
// --------------------------------------------------------------------------


// --------------------------------------------------------------------------
//  NODE-RED
// --------------------------------------------------------------------------

module.exports = function(RED) {

    const register = function(config) {
        RED.nodes.createNode(this, config);
        var node = this;
github NGRP / node-red-contrib-viseo / node-red-contrib-nosql / node-nosql.js View on Github external
'use strict';

const helper                = require('node-red-viseo-helper');
const extend                = require('extend');
const DbSelectorFactory     = require('./lib/database-selector.js');
const databaseRegistry      = require('node-red-contrib-viseo-nosql-manager').dbRegistry;
const DatabaseManager       = require('node-red-contrib-viseo-nosql-manager').DbManager;


// --------------------------------------------------------------------------
//  LOGS
// --------------------------------------------------------------------------


// --------------------------------------------------------------------------
//  NODE-RED
// --------------------------------------------------------------------------

module.exports = function(RED) {

    const register = function(config) {
        RED.nodes.createNode(this, config);
github NGRP / node-red-contrib-viseo / node-red-contrib-nosql / node-handover.js View on Github external
'use strict';

const helper                = require('node-red-viseo-helper');
const DbSelectorFactory     = require('./lib/database-selector.js');
const databaseRegistry      = require('node-red-contrib-viseo-nosql-manager').dbRegistry;
const DatabaseManager       = require('node-red-contrib-viseo-nosql-manager').DbManager;


// --------------------------------------------------------------------------
//  LOGS
// --------------------------------------------------------------------------


// --------------------------------------------------------------------------
//  NODE-RED
// --------------------------------------------------------------------------

module.exports = function(RED) {

    const register = function(config) {
        RED.nodes.createNode(this, config);
github NGRP / node-red-contrib-viseo / node-red-contrib-mongodb / node-mongodb.js View on Github external
'use strict';

const MongoDBManager = require('./lib/mongodb-manager.js');
const dbRegistry = require('node-red-contrib-viseo-nosql-manager').dbRegistry;



// --------------------------------------------------------------------------
//  NODE-RED
// --------------------------------------------------------------------------

module.exports = function(RED) {
    const register = function(config) {
        RED.nodes.createNode(this, config);

        this.useConnectionString = config.useConnectionString;
        this.databaseManager = new MongoDBManager(RED, this);

        //remember to close connections on node-red stop
        let self = this;
github NGRP / node-red-contrib-viseo / node-red-contrib-nedb / node-nedb.js View on Github external
'use strict';

const NeDBManager = require('./lib/nedb-manager.js');
const dbRegistry = require('node-red-contrib-viseo-nosql-manager').dbRegistry;
const helper   = require('node-red-viseo-helper');


// --------------------------------------------------------------------------
//  NODE-RED
// --------------------------------------------------------------------------

module.exports = function(RED) {
    
    const register = function(config) {
        RED.nodes.createNode(this, config);

        this.xlsx = config.xlsx;
        
        let dbPath = helper.resolve(config.path || '{cwd}/data/database.db', undefined, '');
        this.path = dbPath;
github NGRP / node-red-contrib-viseo / node-red-contrib-mongodb / lib / mongodb-manager.js View on Github external
'use strict';
const DatabaseManager = require('node-red-contrib-viseo-nosql-manager').DbManager;
const MongoClient   = new require('mongodb').MongoClient();


class MongoDBManager extends DatabaseManager {

    constructor(node) {
        super();
        this.db = null;
        this.urlRegex = /^mongodb:\/\/(([^:]+):([^@]+)@)?([^:\/]+(:[0-9]+)?(,[^:\/]+(:[0-9]+)?)*)\/([a-zA-Z0-9_\-]+)(\?.*)?$/;
        this._init(node);
    }

    get database() {
    	return _database;
    }
github NGRP / node-red-contrib-viseo / node-red-contrib-nedb / lib / nedb-manager.js View on Github external
'use strict';

const DatabaseManager = require('node-red-contrib-viseo-nosql-manager').DbManager;
const Datastore = require('nedb');
const xlsx      = require('node-xlsx')
const path      = require('path');

class NeDBManager extends DatabaseManager {

    constructor(node) {
        super();
        this.db = null;
        this._init(node);
    }
    get database() {
    	return _database;
    }

    static get definition() {
github NGRP / node-red-contrib-viseo / node-red-contrib-nosql / node-handover.js View on Github external
RED.httpAdmin.get('/nosql/handover/', function(req, res) {
        res.json(databaseRegistry.list);
    });
github NGRP / node-red-contrib-viseo / node-red-contrib-nosql / node-nosql.js View on Github external
RED.httpAdmin.get('/nosql/manager/', function(req, res) {
        res.json(databaseRegistry.list);
    });