{"_id":"@cgpl/nodered-mongodb","_rev":"1-1493476e5b6105cf848be7e5a040a47f","name":"@cgpl/nodered-mongodb","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@cgpl/nodered-mongodb","version":"0.1.0","description":"Node-RED nodes to talk to a Mongo database","devDependencies":{"@rollup/plugin-commonjs":"^20.0.0","@rollup/plugin-node-resolve":"^13.0.4","@rollup/plugin-typescript":"^8.2.5","@types/node":"^18.0.0","@types/node-red":"^1.2.1","rimraf":"^3.0.2","rollup":"^2.56.2","rollup-plugin-terser":"^7.0.2","typescript":"^4.3.5"},"dependencies":{"javascript-interface-library":"^1.0.0","mongodb":"^4.7.0","node-red":"^2.2.2"},"repository":{"type":"git","url":"git+https://github.com/cognitivegarage-ai/nodered-mongodb.git"},"license":"Apache-2.0","keywords":["node-red","mongodb"],"node-red":{"nodes":{"mongo":"src/66-mongodb.js"}},"author":{"name":"Dave Conway-Jones","email":"ceejay@vnet.ibm.com","url":"http://nodered.org"},"scripts":{"build":"rimraf node-red-node-mongodb && rollup -c rollup.config.js && tsc"},"contributors":[{"name":"Ross Cruickshank","email":"ross@vnet.ibm.com"},{"name":"Shivansh","email":"shivansh@cognitivegarage.ai"}],"bugs":{"url":"https://github.com/node-red/node-red-nodes/issues"},"homepage":"https://github.com/node-red/node-red-nodes#readme","main":"rollup.config.js","gitHead":"077ab37fa2b4162869eb93793b1513a3d2513be3","_id":"@cgpl/nodered-mongodb@0.1.0","_nodeVersion":"12.22.9","_npmVersion":"8.5.1","dist":{"integrity":"sha512-X3oy4MoVyldOWR3Q/LSat9GEu5XlnIt6jF5LrI9Rb1qsKqRnIQX/IKeIh8seA4Oh1j9yQGoT3x+b1ZOdv2R7dw==","shasum":"2d26a0bade2db9a6ca57666c22f00e522b1d9a37","tarball":"https://registry.npmjs.org/@cgpl/nodered-mongodb/-/nodered-mongodb-0.1.0.tgz","fileCount":20,"unpackedSize":115409,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2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ivansh-cg","email":"shivansh@cognitivegarage.ai"},"directories":{},"maintainers":[{"name":"shivansh-cg","email":"shivansh@cognitivegarage.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nodered-mongodb_0.1.0_1657102986355_0.0070140809833993956"},"_hasShrinkwrap":false},"0.2.0":{"name":"@cgpl/nodered-mongodb","version":"0.2.0","description":"Node-RED nodes to talk to a Mongo database","license":"Apache-2.0","keywords":["node-red","mongodb"],"node-red":{"nodes":{"mongodb":"mongodb.js"}},"repository":{"type":"git","url":"git+https://github.com/cognitivegarage-ai/nodered-mongodb.git"},"bugs":{"url":"https://github.com/cognitivegarage-ai/nodered-mongodb/issues"},"homepage":"https://github.com/cognitivegarage-ai/nodered-mongodb#readme","main":"mongodb.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","gitHead":"4ba81f27ab34d4944a57a32d4b209aa7ee2a084a","_id":"@cgpl/nodered-mongodb@0.2.0","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-IuoOuQ2dBH2l8BX9LtVxAnszDdT6XSz/PQoqvnA+5lVyza9UxjMNr5cewjRdH7H9ze+0HmMZQW7hLDcbX8s4Aw==","shasum":"ae19fce3d35113350afead6473fd9d383a91be6f","tarball":"https://registry.npmjs.org/@cgpl/nodered-mongodb/-/nodered-mongodb-0.2.0.tgz","fileCount":7,"unpackedSize":29429,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmNQg765OBh53JkmeLvLBzdT2GdoZ12eBxEsVkOfAx4AIgeUXzBC5e6E3fxOXb1gjkw4dDNFMeNR4TsyyPPRKCLrA="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/2DrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrpYhAApRkt6ed8xAXYcaefgW7wtVhizD9yleb7SzO8C/DziWaYI/pQ\r\ny9ZD0rtaE819FrpLXgidS+26a7yLQcHAaeX6/Ni0oKz8yLzBR3hT4vFMDuG9\r\nw1DhEJTjZwD2IHQfsL0slI/EEtcgATv3am/3tyoQ4KYjYMn6blN7KLrxBC87\r\nEGta6/jjQovtWH3YJsrQgBO5bEPd4Sk0kbIUxXPpRelXzhwJ869idXqHkAZs\r\n7gZ8ZKDbN2rFliGJmis1vps6PzGdzaC0K0/Dqqr7N+//dsDDPwDZbpreqtWg\r\nEoC79DihCuvOvs91FTTev+6Fkr4DjvSZS1U2v9z5YaNmoMqQhDgdqL8c2HaL\r\nr2ILBIWT2LT7LE6H9VNf4A6FK3s2H5V/TQiLoofRE3/zI1PNBnx9ZI7KNkv5\r\nvQC2ulHDCDFjZlmdBUGLXH6d7UR4cuddOTiqdOj1nC7l29F046d0JEnFJwPa\r\n60e808d7CPB/HvDBW/Qdbq0ozAFPG8KBd4RHvXGFjCq9WIebzSdhzI8as+yJ\r\nsQ6TM/9icZMWcMSi82UiUa91u6si67y917YJfIhupCPdl+lAZV7wtUK60pXE\r\nDSUCN1/MJZ1AAfukv2j8E1hEtne5jV49NEcPi/Q6ElA8lFqyLv2tpMn3Qjqc\r\ngkzat5sZswLM12yK51LW4r3pdUjFfbeHdNI=\r\n=l1Id\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"shivansh-cg","email":"shivansh@cognitivegarage.ai"},"directories":{},"maintainers":[{"name":"shivansh-cg","email":"shivansh@cognitivegarage.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nodered-mongodb_0.2.0_1660903659573_0.5762498262526106"},"_hasShrinkwrap":false}},"time":{"created":"2022-07-06T10:23:06.287Z","0.1.0":"2022-07-06T10:23:06.560Z","modified":"2022-08-19T10:07:39.808Z","0.2.0":"2022-08-19T10:07:39.726Z"},"maintainers":[{"name":"shivansh-cg","email":"shivansh@cognitivegarage.ai"}],"description":"Node-RED nodes to talk to a Mongo database","homepage":"https://github.com/cognitivegarage-ai/nodered-mongodb#readme","keywords":["node-red","mongodb"],"repository":{"type":"git","url":"git+https://github.com/cognitivegarage-ai/nodered-mongodb.git"},"bugs":{"url":"https://github.com/cognitivegarage-ai/nodered-mongodb/issues"},"license":"Apache-2.0","readme":"# Taken from\nhttps://github.com/node-red/node-red-nodes/tree/master/storage/mongodb\n\nnode-red-node-mongodb\n=====================\n\nA <a href=\"http://nodered.org\" target=\"_new\">Node-RED</a> node to save data in a MongoDB database.\n\n**Note** : This is the same node as was in the core of Node-RED.\nAs of v0.10.8 you will need to install it from here if still required.\n\nPre-requisite\n-------------\n\nTo run this you need a local MongoDB server running. For details see\n<a href=\"https://www.mongodb.org/\" target=\"_new\">the MongoDB site</a>.\n\nInstall\n-------\n\nRun the following command in your Node-RED user directory - typically `~/.node-red`\n```\n        npm install node-red-node-mongodb\n```\nNote that this package requires a MongoDB client package at least version 3.6.3 - if you have an older (version 2) client,\nyou may need to remove that before installing this\n```\n        npm remove mongodb\n        npm install node-red-node-mongodb\n```\n\nUsage\n-----\n\nNodes to save and retrieve data in a MongoDB instance - the database server can be local (mongodb//:localhost:27017), remote (mongodb://hostname.network:27017),\nreplica-set or cluster (mongodb://hostnameA.network:27017,hostnameB.network:27017), and DNS seedlist cluster (mongodb+srv://clustername.network).\n\nReference [MongoDB docs](https://docs.mongodb.com/manual/reference/connection-string/) to see which connection method (host or clustered) to use for your MongoDB instance.\n\n### Input\n\nCalls a MongoDB collection method based on the selected operator.\n\n*Find* queries a collection using the `msg.payload` as the query statement as\nper the *.find()* function.\n\nOptionally, you may also (via a function) set\n\n- a `msg.projection` object to constrain the returned fields,\n- a `msg.sort` object,\n- a `msg.limit` number,\n- a `msg.skip` number.\n\n*Count* returns a count of the number of documents in a collection or matching a\nquery using the `msg.payload` as the query statement.\n\n*Aggregate* provides access to the aggregation pipeline using the `msg.payload` as the pipeline array.\n\nYou can either set the collection method in the node config or on `msg.collection`.\nSetting it in the node will override `msg.collection`.\n\nSee the <a href=\"http://docs.mongodb.org/manual/reference/method/db.collection.find/\" target=\"new\">*MongoDB collection methods docs*</a> for examples.\n\nThe result is returned in `msg.payload`.\n\n### Output\n\nA simple MongoDB output node. Can save, insert, update and remove objects from a chosen collection.\n\nMongoDB only accepts objects.\n\nSave and insert can either store `msg` or `msg.payload`. If msg.payload is\nselected it should contain an object. If not it will be wrapped in an object with a name of payload.\n\n*Save* will update an existing object or insert a new object if one does not already exist.\n\n*Insert* will insert a new object.\n\n*Update* will modify an existing object or objects. The query to select objects\nto update uses `msg.query` and the update to the element uses `msg.payload`.\nUpdate can add an object if it does not exist or update multiple objects.\n\n*Remove* will remove objects that match the query passed in on `msg.payload`.\nA blank query will delete *all of the objects* in the collection.\n\nYou can either set the collection method in the node config or on `msg.collection`.\nSetting it in the node will override `msg.collection`.\n\nBy default MongoDB creates an `msg._id` property as the primary key - so\nrepeated injections of the same `msg` will result in many database entries.\nIf this is NOT the desired behaviour - ie. you want repeated entries to overwrite,\nthen you must set the `msg._id` property to be a constant by the use of a previous function node.\nThis must be done at the correct level. If only writing msg.payload then payload must contain the \\_id property.\nIf writing the whole msg object then it must contain an \\_id property.\n\nThis could be a unique constant or you could create one based on some other msg property.\n\nCurrently we do not limit or cap the collection size at all...\n","readmeFilename":"README.md"}