Skip to content

Commit 72d0765

Browse files
committed
Minor line length
1 parent b0b2efd commit 72d0765

File tree

2 files changed

+41
-15
lines changed

2 files changed

+41
-15
lines changed

README.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# node-red-contrib-postgresql
22

3-
[node-red-contrib-postgresql](https://github.com/alexandrainst/node-red-contrib-postgresql) is a [**Node-RED**](https://nodered.org/) node to query a [**PostgreSQL**](https://www.postgresql.org/) 🐘 database.
3+
[node-red-contrib-postgresql](https://github.com/alexandrainst/node-red-contrib-postgresql)
4+
is a [**Node-RED**](https://nodered.org/) node to query a [**PostgreSQL**](https://www.postgresql.org/) 🐘 database.
45

56
It supports *splitting* the resultset and *backpressure* (flow control), to allow working with large datasets.
67

@@ -10,9 +11,11 @@ It supports *parameterized queries*.
1011

1112
The response (rows) is provided in `msg.payload` as an array.
1213

13-
An exception is if the *Split results* option is enabled and the *Number of rows per message* set to **1**, then `msg.payload` is not an array but the single-row response.
14+
An exception is if the *Split results* option is enabled and the *Number of rows per message* is set to **1**,
15+
then `msg.payload` is not an array but the single-row response.
1416

15-
Additional information is provided as `msg.pgsql.rowCount` and `msg.pgsql.command`. See the [underlying documentation](https://node-postgres.com/api/result) for details.
17+
Additional information is provided as `msg.pgsql.rowCount` and `msg.pgsql.command`.
18+
See the [underlying documentation](https://node-postgres.com/api/result) for details.
1619

1720
In the case of multiple queries, then `msg.pgsql` is an array.
1821

@@ -73,17 +76,21 @@ You will then need to restart Node-RED.
7376
## Backpressure
7477

7578
This node supports *backpressure* / *flow control*:
76-
when the *Split results* option is enabled, it waits for a *tick* before releasing the next batch of lines, to make sure the rest of your Node-RED flow is ready to process more data
79+
when the *Split results* option is enabled, it waits for a *tick* before releasing the next batch of lines,
80+
to make sure the rest of your Node-RED flow is ready to process more data
7781
(instead of risking an out-of-memory condition), and also conveys this information upstream.
7882

79-
So when the *Split results* option is enabled, this node will only output one message at first, and then awaits a message containing a truthy `msg.tick` before releasing the next message.
83+
So when the *Split results* option is enabled, this node will only output one message at first,
84+
and then awaits a message containing a truthy `msg.tick` before releasing the next message.
8085

81-
To make this behaviour potentially automatic (avoiding manual wires), this node declares its ability by exposing a truthy `node.tickConsumer` for downstream nodes to detect this feature, and a truthy `node.tickProvider` for upstream nodes.
86+
To make this behaviour potentially automatic (avoiding manual wires), this node declares its ability by exposing a truthy `node.tickConsumer`
87+
for downstream nodes to detect this feature, and a truthy `node.tickProvider` for upstream nodes.
8288
Likewise, this node detects upstream nodes using the same back-pressure convention, and automatically sends ticks.
8389

8490
## Sequences for split results
8591

86-
When the *Split results* option is enabled (streaming), the messages contain some information following the conventions for [*messages sequences*](https://nodered.org/docs/user-guide/messages#message-sequences).
92+
When the *Split results* option is enabled (streaming), the messages contain some information following the
93+
conventions for [*messages sequences*](https://nodered.org/docs/user-guide/messages#message-sequences).
8794

8895
```js
8996
{
@@ -100,7 +107,13 @@ When the *Split results* option is enabled (streaming), the messages contain som
100107

101108
## Credits
102109

103-
Major rewrite in July 2021 by [Alexandre Alapetite](https://alexandra.dk/alexandre.alapetite) ([Alexandra Institute](https://alexandra.dk)), of parents forks: [andreabat](https://github.com/andreabat/node-red-contrib-postgrestor) / [ymedlop](https://github.com/doing-things-with-node-red/node-red-contrib-postgrestor) / [HySoaKa](https://github.com/HySoaKa/node-red-contrib-postgrestor), with inspiration from [node-red-contrib-re-postgres](https://flows.nodered.org/node/node-red-contrib-re-postgres) ([code](https://github.com/elmagopy/node-red-contrib-re2-postgres)).
110+
Major rewrite in July 2021 by [Alexandre Alapetite](https://alexandra.dk/alexandre.alapetite) ([Alexandra Institute](https://alexandra.dk)),
111+
of parents forks:
112+
[andreabat](https://github.com/andreabat/node-red-contrib-postgrestor) /
113+
[ymedlop](https://github.com/doing-things-with-node-red/node-red-contrib-postgrestor) /
114+
[HySoaKa](https://github.com/HySoaKa/node-red-contrib-postgrestor),
115+
with inspiration from [node-red-contrib-re-postgres](https://flows.nodered.org/node/node-red-contrib-re-postgres)
116+
([code](https://github.com/elmagopy/node-red-contrib-re2-postgres)).
104117

105118
This node builds uppon the [node-postgres](https://github.com/brianc/node-postgres) (`pg`) library.
106119

locales/en-US/postgresql.html

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
<script type="text/x-red" data-help-name="postgresql">
2-
<p><a href="https://github.com/alexandrainst/node-red-contrib-postgresql">node-red-contrib-postgresql</a> is a Node-RED node to query a <a href="https://www.postgresql.org/">PostgreSQL</a> 🐘 database.</p>
2+
<p>
3+
<a href="https://github.com/alexandrainst/node-red-contrib-postgresql">node-red-contrib-postgresql</a>
4+
is a Node-RED node to query a <a href="https://www.postgresql.org/">PostgreSQL</a> 🐘 database.
5+
</p>
36

47
<h3>Outputs</h3>
58
<p>The response (rows) is provided in <code>msg.payload</code> as an array.</p>
6-
<p>An exception is if the <em>Split results</em> option is enabled and the <em>Number of rows per message</em> set to 1, then <code>msg.payload</code> is not an array but the single-row response.</p>
7-
<p>Additional information is provided as <code>msg.pgsql.rowCount</code> and <code>msg.pgsql.command</code>. See the <a href="https://node-postgres.com/api/result">underlying documentation</a> for details.</p>
9+
<p>
10+
An exception is if the <em>Split results</em> option is enabled and the <em>Number of rows per message</em> is set to 1,
11+
then <code>msg.payload</code> is not an array but the single-row response.
12+
</p>
13+
<p>
14+
Additional information is provided as <code>msg.pgsql.rowCount</code> and <code>msg.pgsql.command</code>.
15+
See the <a href="https://node-postgres.com/api/result">underlying documentation</a> for details.
16+
</p>
817
<p>In the case of multiple queries, then <code>msg.pgsql</code> is an array.</p>
918

1019
<h3>Inputs</h3>
@@ -33,19 +42,23 @@ <h4>Parameterized queries</h4>
3342
<h3>Backpressure</h3>
3443
<p>
3544
This node supports <em>backpressure</em> / <em>flow control</em>:
36-
when the <em>Split results</em> option is enabled, it waits for a <em>tick</em> before releasing the next batch of lines, to make sure the rest of your Node-RED flow is ready to process more data
45+
when the <em>Split results</em> option is enabled, it waits for a <em>tick</em> before releasing the next batch of lines,
46+
to make sure the rest of your Node-RED flow is ready to process more data
3747
(instead of risking an out-of-memory condition), and also conveys this information upstream.
3848
</p><p>
39-
So when the <em>Split results</em> option is enabled, this node will only output one message at first, and then awaits a message containing a truthy <code>msg.tick</code> before releasing the next message.
49+
So when the <em>Split results</em> option is enabled, this node will only output one message at first,
50+
and then awaits a message containing a truthy <code>msg.tick</code> before releasing the next message.
4051
</p><p>
41-
To make this behaviour potentially automatic (avoiding manual wires), this node declares its ability by exposing a truthy <code>node.tickConsumer</code> for downstream nodes to detect this feature,
52+
To make this behaviour potentially automatic (avoiding manual wires),
53+
this node declares its ability by exposing a truthy <code>node.tickConsumer</code> for downstream nodes to detect this feature,
4254
and a truthy <code>node.tickProvider</code> for upstream nodes.
4355
Likewise, this node detects upstream nodes using the same back-pressure convention, and automatically sends ticks.
4456
</p>
4557

4658
<h3>Sequences for split results</h3>
4759
<p>
48-
When the <em>Split results</em> option is enabled (streaming), the messages contain some information following the conventions for <a href="https://nodered.org/docs/user-guide/messages#message-sequences"><em>messages sequences</em></a>.
60+
When the <em>Split results</em> option is enabled (streaming), the messages contain some information following the conventions
61+
for <a href="https://nodered.org/docs/user-guide/messages#message-sequences"><em>messages sequences</em></a>.
4962
</p>
5063

5164
<pre>

0 commit comments

Comments
 (0)