UNPKG

node-red-contrib-mongoql

Version:

MongoDB Query for Node-Red

44 lines (42 loc) 1.78 kB
<script type="text/html" data-template-name="deleteMany"> <div class="form-row"> <label for="node-input-name">Name</label> <input type="text" id="node-input-name" placeholder="Name"> </div> <div class="form-tips"> To use this node, you need to provide <code>msg.url</code> (string), <code>msg.db_name</code> (string), <code>msg.db_collection</code> (string) and <code>msg.filter</code> (json) on your function node or inject node. </div> </script> <script type="text/html" data-help-name="deleteMany"> <p> <strong>About</strong><br/> This node implement deleteMany function from MongoDB Driver.<br/><br/> To use this node, you need to provide <code>msg.url</code> (string), <code>msg.db_name</code> (string), <code>msg.db_collection</code> (string) and <code>msg.filter</code> (json).<br/><br/> You can check <a href="https://docs.mongodb.com/manual/reference/method/db.collection.deleteMany/">MongoDB deleteMany</a>.<br/><br/> <strong>Example (Function Node)</strong><br/> msg.url = "mongodb://localhost:27017";<br/> msg.db_name = "pos";<br/> msg.db_collection = "product";<br/> msg.filter = {"category": "vegetables"};<br/> return msg; </p> </script> <script type="text/javascript"> RED.nodes.registerType('deleteMany', { category: 'MongoQL', color: '#68B368', defaults: { name: { value: "" } }, inputs: 1, outputs: 1, icon: "mongodb.png", paletteLabel: 'deleteMany', align: 'left', label: function () { return this.name || "deleteMany"; } }); </script>