update storage nodes info style

This commit is contained in:
Dave Conway-Jones 2016-03-02 13:27:22 +00:00
parent b6116abce3
commit 86049c20cb
15 changed files with 75 additions and 67 deletions

View File

@ -47,8 +47,8 @@
<script type="text/x-red" data-help-name="leveldb in"> <script type="text/x-red" data-help-name="leveldb in">
<p>Uses <a href="https://code.google.com/p/leveldb/" target="_new"><i>LevelDB</i></a> for a simple key value pair database.</p> <p>Uses <a href="https://code.google.com/p/leveldb/" target="_new"><i>LevelDB</i></a> for a simple key value pair database.</p>
<p>Use this node to <b>get</b>, or retrieve the data already saved in the database.</p> <p>Use this node to <b>get</b>, or retrieve the data already saved in the database.</p>
<p><b>msg.topic</b> must hold the <i>key</i> for the database, and the result is returned in <b>msg.payload</b>.</p> <p><code>msg.topic</code> must hold the <i>key</i> for the database, and the result is returned in <code>msg.payload</code>.</p>
<p>If nothing is found for the key then <b>msg.payload</b> is set to the <i>null</i> object.</p> <p>If nothing is found for the key then <code>msg.payload</code> is set to the <i>null</i> object.</p>
</script> </script>
<script type="text/javascript"> <script type="text/javascript">
@ -94,8 +94,8 @@
<script type="text/x-red" data-help-name="leveldb out"> <script type="text/x-red" data-help-name="leveldb out">
<p>Uses <a href="https://code.google.com/p/leveldb/" target="_new"><i>LevelDB</i></a> for a simple key value pair database.</p> <p>Uses <a href="https://code.google.com/p/leveldb/" target="_new"><i>LevelDB</i></a> for a simple key value pair database.</p>
<p>Use this node to either <b>put</b> (store) the <b>msg.payload</b> to the named database file, using <b>msg.topic</b> as the key.</p> <p>Use this node to either <b>put</b> (store) the <code>msg.payload</code> to the named database file, using <code>msg.topic</code> as the key.</p>
<p>To <b>delete</b> information select delete in the properties dialogue and again use <b>msg.topic</b> as the key.</b>.</p> <p>To <b>delete</b> information select delete in the properties dialogue and again use <code>msg.topic</code> as the key.</b>.</p>
</script> </script>
<script type="text/javascript"> <script type="text/javascript">

View File

@ -5,7 +5,7 @@ A <a href="http://nodered.org" target="_new">Node-RED</a> node to read and write
Install Install
------- -------
Run the following command in the root directory of your Node-RED install Run the following command in your Node-RED user directory - typically `~/.node-red`
npm install node-red-node-leveldb npm install node-red-node-leveldb
@ -19,8 +19,10 @@ Uses <a href="https://code.google.com/p/leveldb/" target="_new"><i>LevelDB</i></
There are two node to choose from... There are two node to choose from...
Use one node to either <b>put</b> (store) the <b>msg.payload</b> to the named database file, using <b>msg.topic</b> as the key, or to <b>delete</b> information select delete in the properties dialogue and again use <b>msg.topic</b> as the key.</b>. Use one node to either <b>put</b> (store) the `msg.payload` to the named database file, using `msg.topic`
as the key, or to <b>delete</b> information select delete in the properties dialogue and again use `msg.topic` as the key.
Use the other node to <b>get</b>, or retrieve the data already saved in the database. Use the other node to <b>get</b>, or retrieve the data already saved in the database.
Again use <b>msg.topic</b> to hold the <i>key</i> for the database, and the result is returned in <b>msg.payload</b>. If nothing is found for the key then <i>null</i> is returned. Again use `msg.topic` to hold the <i>key</i> for the database, and the result is returned in `msg.payload`.
If nothing is found for the key then <i>null</i> is returned.

View File

@ -1,6 +1,6 @@
{ {
"name" : "node-red-node-leveldb", "name" : "node-red-node-leveldb",
"version" : "0.0.5", "version" : "0.0.6",
"description" : "A Node-RED node to read and write to a LevelDB database", "description" : "A Node-RED node to read and write to a LevelDB database",
"dependencies" : { "dependencies" : {
"level" : "1.0.0" "level" : "1.0.0"

View File

@ -104,13 +104,18 @@
<p>A simple MongoDB output node. Can save, insert, update and remove objects from a chosen collection.</p> <p>A simple MongoDB output node. Can save, insert, update and remove objects from a chosen collection.</p>
<p>Save will update an existing object or insert a new object if one does not already exist.</p> <p>Save will update an existing object or insert a new object if one does not already exist.</p>
<p>Insert will insert a new object.</p> <p>Insert will insert a new object.</p>
<p>Save and insert either store <b>msg</b> or <b>msg.payload</b>.</p> <p>Save and insert either store <code>msg</code> or <code>msg.payload</code>.</p>
<p>Update will modify an existing object or objects. The query to select objects to update uses <b>msg.query</b> and the update to the element uses <b>msg.payload</b>.</p> <p>Update will modify an existing object or objects. The query to select objects to update uses <code>msg.query</code>
and the update to the element uses <code>msg.payload</code>.</p>
<p>Update can add a object if it does not exist or update multiple objects.</p> <p>Update can add a object if it does not exist or update multiple objects.</p>
<p>Remove will remove objects that match the query passed in on <b>msg.payload</b>. A blank query will delete <i>all of the objects</i> in the collection.</p> <p>Remove will remove objects that match the query passed in on <code>msg.payload</code>. A blank query will delete
<p>You can either set the collection method in the node config or on <b>msg.collection</b>. Setting it in the node will override <b>msg.collection</b>.</p> <i>all of the objects</i> in the collection.</p>
<p>By default MongoDB creates an <i>_id</i> property as the primary key - so repeated injections of the same <b>msg</b> will result in many database entries.</p> <p>You can either set the collection method in the node config or on <code>msg.collection</code>. Setting it in the
<p>If this is NOT the desired behaviour - ie. you want repeated entries to overwrite, then you must set the <b>msg._id</b> property to be a constant by the use of a previous function node.</p> node will override <code>msg.collection</code>.</p>
<p>By default MongoDB creates an <i>_id</i> property as the primary key - so repeated injections of the
same <code>msg</code> will result in many database entries.</p>
<p>If this is NOT the desired behaviour - ie. you want repeated entries to overwrite, then you must set
the <code>msg._id</code> property to be a constant by the use of a previous function node.</p>
<p>This could be a unique constant or you could create one based on some other msg property.</p> <p>This could be a unique constant or you could create one based on some other msg property.</p>
<p>Currently we do not limit or cap the collection size at all... this may well change.</p> <p>Currently we do not limit or cap the collection size at all... this may well change.</p>
</script> </script>
@ -195,12 +200,17 @@
<script type="text/x-red" data-help-name="mongodb in"> <script type="text/x-red" data-help-name="mongodb in">
<p>Calls a MongoDB collection method based on the selected operator.</p> <p>Calls a MongoDB collection method based on the selected operator.</p>
<p>Find queries a collection using the <b>msg.payload</b> as the query statement as per the .find() function. Optionally, you may also (via a function) set a <b>msg.projection</b> object to constrain the returned fields, a <b>msg.sort</b> object, a <b>msg.limit</b> number and a <b>msg.skip</b> number.</p> <p>Find queries a collection using the <code>msg.payload</code> as the query statement as per the .find() function.
<p>Count returns a count of the number of documents in a collection or matching a query using the <b>msg.payload</b> as the query statement.</p> Optionally, you may also (via a function) set a <code>msg.projection</code> object to constrain the returned
<p>Aggregate provides access to the aggregation pipeline using the <b>msg.payload</b> as the pipeline array.</p> fields, a <code>msg.sort</code> object, a <code>msg.limit</code> number and a <code>msg.skip</code> number.</p>
<p>You can either set the collection method in the node config or on <b>msg.collection</b>. Setting it in the node will override <b>msg.collection</b>.</p> <p>Count returns a count of the number of documents in a collection or matching a query using the
<p>See the <a href="http://docs.mongodb.org/manual/reference/method/db.collection.find/" target="new"><i>MongoDB collection methods docs</i></a> for examples.</p> <code>msg.payload</code> as the query statement.</p>
<p>The result is returned in <b>msg.payload</b>.</p> <p>Aggregate provides access to the aggregation pipeline using the <code>msg.payload</code> as the pipeline array.</p>
<p>You can either set the collection method in the node config or on <code>msg.collection</code>. Setting it in
the node will override <code>msg.collection</code>.</p>
<p>See the <a href="http://docs.mongodb.org/manual/reference/method/db.collection.find/" target="new"><i>MongoDB
collection methods docs</i></a> for examples.</p>
<p>The result is returned in <code>msg.payload</code>.</p>
</script> </script>
<script type="text/javascript"> <script type="text/javascript">

View File

@ -15,8 +15,7 @@ To run this you need a local MongoDB server running. For details see
Install Install
------- -------
Run the following command in the root directory of your Node-RED install. Run the following command in your Node-RED user directory - typically `~/.node-red`
Usually this is `~/.node-red` .
npm install node-red-node-mongodb npm install node-red-node-mongodb
@ -25,39 +24,39 @@ Usage
Nodes to save and retrieve data in a local MongoDB instance. Nodes to save and retrieve data in a local MongoDB instance.
###Input ### Input
Calls a MongoDB collection method based on the selected operator. Calls a MongoDB collection method based on the selected operator.
*Find* queries a collection using the **msg.payload** as the query statement as *Find* queries a collection using the `msg.payload` as the query statement as
per the *.find()* function. per the *.find()* function.
Optionally, you may also (via a function) set Optionally, you may also (via a function) set
- a **msg.projection** object to constrain the returned fields, - a `msg.projection` object to constrain the returned fields,
- a **msg.sort** object, - a `msg.sort` object,
- a **msg.limit** number, - a `msg.limit` number,
- a **msg.skip** number. - a `msg.skip` number.
*Count* returns a count of the number of documents in a collection or matching a *Count* returns a count of the number of documents in a collection or matching a
query using the **msg.payload** as the query statement. query using the `msg.payload` as the query statement.
*Aggregate* provides access to the aggregation pipeline using the **msg.payload** as the pipeline array. *Aggregate* provides access to the aggregation pipeline using the `msg.payload` as the pipeline array.
You can either set the collection method in the node config or on **msg.collection**. You can either set the collection method in the node config or on `msg.collection`.
Setting it in the node will override **msg.collection**. Setting it in the node will override `msg.collection`.
See the <a href="http://docs.mongodb.org/manual/reference/method/db.collection.find/" target="new">*MongoDB collection methods docs*</a> for examples. See the <a href="http://docs.mongodb.org/manual/reference/method/db.collection.find/" target="new">*MongoDB collection methods docs*</a> for examples.
The result is returned in **msg.payload**. The result is returned in `msg.payload`.
###Output ### Output
A simple MongoDB output node. Can save, insert, update and remove objects from a chosen collection. A simple MongoDB output node. Can save, insert, update and remove objects from a chosen collection.
MongoDB only accepts objects. MongoDB only accepts objects.
Save and insert can either store **msg** or **msg.payload**. If msg.payload is Save and insert can either store `msg` or `msg.payload`. If msg.payload is
selected it should contain an object. If not it will be wrapped in an object with a name of payload. selected it should contain an object. If not it will be wrapped in an object with a name of payload.
*Save* will update an existing object or insert a new object if one does not already exist. *Save* will update an existing object or insert a new object if one does not already exist.
@ -65,19 +64,19 @@ selected it should contain an object. If not it will be wrapped in an object wit
*Insert* will insert a new object. *Insert* will insert a new object.
*Update* will modify an existing object or objects. The query to select objects *Update* will modify an existing object or objects. The query to select objects
to update uses **msg.query** and the update to the element uses **msg.payload**. to update uses `msg.query` and the update to the element uses `msg.payload`.
Update can add an object if it does not exist or update multiple objects. Update can add an object if it does not exist or update multiple objects.
*Remove* will remove objects that match the query passed in on **msg.payload**. *Remove* will remove objects that match the query passed in on `msg.payload`.
A blank query will delete *all of the objects* in the collection. A blank query will delete *all of the objects* in the collection.
You can either set the collection method in the node config or on **msg.collection**. You can either set the collection method in the node config or on `msg.collection`.
Setting it in the node will override **msg.collection**. Setting it in the node will override `msg.collection`.
By default MongoDB creates an **msg._id** property as the primary key - so By default MongoDB creates an `msg._id` property as the primary key - so
repeated injections of the same **msg** will result in many database entries. repeated injections of the same `msg` will result in many database entries.
If this is NOT the desired behaviour - ie. you want repeated entries to overwrite, If this is NOT the desired behaviour - ie. you want repeated entries to overwrite,
then you must set the **msg._id** property to be a constant by the use of a previous function node. then you must set the `msg._id` property to be a constant by the use of a previous function node.
This must be done at the correct level. If only writing msg.payload then payload must contain the \_id property. This must be done at the correct level. If only writing msg.payload then payload must contain the \_id property.
If writing the whole msg object then it must contain an \_id property. If writing the whole msg object then it must contain an \_id property.

View File

@ -22,10 +22,10 @@
"count": "count", "count": "count",
"aggregate": "aggregate" "aggregate": "aggregate"
}, },
"tip": "<b> Tip:</b> If no collection is set, ensure <b>msg.collection</b> will contain the collection name", "tip": "<b> Tip:</b> If no collection is set, ensure <code>msg.collection</code> will contain the collection name",
"errors": { "errors": {
"nocollection": "No collection defined", "nocollection": "No collection defined",
"missingconfig": "missing mongodb configuration" "missingconfig": "missing mongodb configuration"
} }
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name" : "node-red-node-mongodb", "name" : "node-red-node-mongodb",
"version" : "0.0.4", "version" : "0.0.5",
"description" : "Node-RED nodes to talk to an Mongo database", "description" : "Node-RED nodes to talk to an Mongo database",
"dependencies" : { "dependencies" : {
"mongodb" : "1.4.29" "mongodb" : "1.4.29"

View File

@ -77,9 +77,9 @@
<script type="text/x-red" data-help-name="mysql"> <script type="text/x-red" data-help-name="mysql">
<p>Allows basic access to a MySQL database.</p> <p>Allows basic access to a MySQL database.</p>
<p>This node uses the <b>query</b> operation against the configured database. This does allow both INSERTS and DELETES. <p>This node uses the <b>query</b> operation against the configured database. This does allow both INSERTS and DELETES.
By it's very nature it allows SQL injection... so <i>be careful out there...</i></p> By its very nature it allows SQL injection... so <i>be careful out there...</i></p>
<p><b>msg.topic</b> must hold the <i>query</i> for the database, and the result is returned in <b>msg.payload</b>.</p> <p><code>msg.topic</code> must hold the <i>query</i> for the database, and the result is returned in <code>msg.payload</code>.</p>
<p><b>msg.payload</b> can contain an array of values to bind to the topic.</p> <p><code>msg.payload</code> can contain an array of values to bind to the topic.</p>
<p>Typically the returned payload will be an array of the result rows.</p> <p>Typically the returned payload will be an array of the result rows.</p>
<p>If nothing is found for the key then <i>null</i> is returned,</p> <p>If nothing is found for the key then <i>null</i> is returned,</p>
<p>The reconnect timeout in milliseconds can be changed by adding a line to <b>settings.js</b> <p>The reconnect timeout in milliseconds can be changed by adding a line to <b>settings.js</b>

View File

@ -5,7 +5,7 @@ A <a href="http://nodered.org" target="_new">Node-RED</a> node to read and write
Install Install
------- -------
Run the following command in the root directory of your Node-RED install Run the following command in your Node-RED user directory - typically `~/.node-red`
npm install node-red-node-mysql npm install node-red-node-mysql
@ -19,7 +19,7 @@ This node uses the <b>query</b> operation against the configured database. This
By it's very nature it allows SQL injection... so <i>be careful out there...</i> By it's very nature it allows SQL injection... so <i>be careful out there...</i>
The <b>msg.topic</b> must hold the <i>query</i> for the database, and the result is returned in <b>msg.payload</b>. The `msg.topic` must hold the <i>query</i> for the database, and the result is returned in `msg.payload`.
Typically the returned payload will be an array of the result rows. Typically the returned payload will be an array of the result rows.

View File

@ -1,6 +1,6 @@
{ {
"name" : "node-red-node-mysql", "name" : "node-red-node-mysql",
"version" : "0.0.7", "version" : "0.0.8",
"description" : "A Node-RED node to read and write to a MySQL database", "description" : "A Node-RED node to read and write to a MySQL database",
"dependencies" : { "dependencies" : {
"mysql" : "2.9.*" "mysql" : "2.9.*"

View File

@ -3,9 +3,6 @@ node-red-node-redis
A <a href="http://nodered.org" target="_new">Node-RED</a> node to save data in a Redis database. A <a href="http://nodered.org" target="_new">Node-RED</a> node to save data in a Redis database.
**Note** : This is the same node as was in the core of Node-RED.
As of v0.10.8 you will need to install it from here if still required.
Pre-requisite Pre-requisite
------------- -------------
@ -15,8 +12,7 @@ To run this you need a local Redis server running. For details see <a href="http
Install Install
------- -------
Run the following command in the root directory of your Node-RED install. Run the following command in your Node-RED user directory - typically `~/.node-red`
Usually this is `~/.node-red` .
npm install node-red-node-redis npm install node-red-node-redis
@ -25,10 +21,10 @@ Usage
Simple node to save data in a local Redis instance Simple node to save data in a local Redis instance
###Output ### Output
A Redis output node. Options include **Hash**, **Set**, **List** and **String**. A Redis output node. Options include **Hash**, **Set**, **List** and **String**.
If **key** is blank, the **msg.topic** will be used as the key. If **key** is blank, the `msg.topic` will be used as the key.
If **type** is *hash*, **msg.payload** should be an *object* or *field=value* string. If **type** is *hash*, `msg.payload` should be an *object* or *field=value* string.

View File

@ -1,6 +1,6 @@
{ {
"name" : "node-red-node-redis", "name" : "node-red-node-redis",
"version" : "0.0.2", "version" : "0.0.3",
"description" : "A Node-RED node to save data to an Redis database", "description" : "A Node-RED node to save data to an Redis database",
"dependencies" : { "dependencies" : {
"redis" : "0.12.1" "redis" : "0.12.1"

View File

@ -6,7 +6,7 @@ A Node-Red node to read and write a local sqlite database.
Install Install
------- -------
Run the following command in the root directory of your Node-RED install Run the following command in your Node-RED user directory - typically `~/.node-red`
npm install node-red-node-sqlite npm install node-red-node-sqlite
@ -16,11 +16,12 @@ Usage
Allows basic access to a Sqlite database. Allows basic access to a Sqlite database.
This node uses the <b>db.all</b> operation against the configured database. This does allow INSERTS, UPDATES and DELETES. This node uses the <b>db.all</b> operation against the configured database.
This does allow INSERTS, UPDATES and DELETES.
By it's very nature it is SQL injection... so *be careful* out there... By it's very nature it is SQL injection... so *be careful* out there...
**msg.topic** must hold the <i>query</i> for the database, and the result is returned in **msg.payload**. `msg.topic` must hold the <i>query</i> for the database, and the result is returned in `msg.payload`.
Typically the returned payload will be an array of the result rows, (or an error). Typically the returned payload will be an array of the result rows, (or an error).

View File

@ -1,6 +1,6 @@
{ {
"name" : "node-red-node-sqlite", "name" : "node-red-node-sqlite",
"version" : "0.1.0", "version" : "0.1.1",
"description" : "A sqlite node for Node-RED", "description" : "A sqlite node for Node-RED",
"dependencies" : { "dependencies" : {
"sqlite3" : "3.1.*" "sqlite3" : "3.1.*"

View File

@ -48,9 +48,9 @@
<script type="text/x-red" data-help-name="sqlite"> <script type="text/x-red" data-help-name="sqlite">
<p>Allows basic access to a Sqlite database.</p> <p>Allows basic access to a Sqlite database.</p>
<p>This node uses the <b>db.all</b> operation against the configured database. This does allow INSERTS, UPDATES and DELETES. <p>This node uses the <b>db.all</b> operation against the configured database. This does allow INSERTS, UPDATES and DELETES.
By it's very nature it is SQL injection... so <i>be careful out there...</i></p> By its very nature it is SQL injection... so <i>be careful out there...</i></p>
<p><b>msg.topic</b> must hold the <i>query</i> for the database, and the result is returned in <b>msg.payload</b>.</p> <p><code>msg.topic</code> must hold the <i>query</i> for the database, and the result is returned in <code>msg.payload</code>.</p>
<p><b>msg.payload</b> can contain an array of values to bind to the topic.</p> <p><code>msg.payload</code> can contain an array of values to bind to the topic.</p>
<p>Typically the returned payload will be an array of the result rows, (or an error).</p> <p>Typically the returned payload will be an array of the result rows, (or an error).</p>
<p>The reconnect timeout in milliseconds can be changed by adding a line to <b>settings.js</b> <p>The reconnect timeout in milliseconds can be changed by adding a line to <b>settings.js</b>
<pre>sqliteReconnectTime: 20000,</pre></p> <pre>sqliteReconnectTime: 20000,</pre></p>