@aaqu/fromcubes-db 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/NOTICE +24 -0
- package/README.md +442 -2
- package/SECURITY.md +75 -0
- package/THIRD-PARTY-NOTICES.md +151 -0
- package/examples/Quick Start/All Databases.json +1719 -0
- package/examples/Quick Start/ClickHouse.json +278 -0
- package/examples/Quick Start/CockroachDB.json +280 -0
- package/examples/Quick Start/Firebird.json +278 -0
- package/examples/Quick Start/MariaDB.json +281 -0
- package/examples/Quick Start/MySQL.json +281 -0
- package/examples/Quick Start/Oracle.json +280 -0
- package/examples/Quick Start/PostgreSQL.json +280 -0
- package/examples/Quick Start/SQL Server.json +282 -0
- package/examples/Quick Start/SQLite.json +278 -0
- package/examples/Quick Start/TiDB.json +281 -0
- package/examples/Quick Start/YugabyteDB.json +280 -0
- package/examples/SQLite Sensor Log With Portal.json +391 -0
- package/examples/Select With Parameters.json +130 -0
- package/index.js +32 -0
- package/lib/adapters/clickhouse.js +254 -0
- package/lib/adapters/firebird.js +416 -0
- package/lib/adapters/index.js +37 -0
- package/lib/adapters/mssql.js +178 -0
- package/lib/adapters/mysql.js +171 -0
- package/lib/adapters/oracle.js +272 -0
- package/lib/adapters/postgres.js +161 -0
- package/lib/adapters/read.js +57 -0
- package/lib/adapters/sqlite.js +193 -0
- package/lib/adapters/time.js +89 -0
- package/lib/bound.js +29 -0
- package/lib/editor-api.js +134 -0
- package/lib/editor-preview.js +191 -0
- package/lib/errors.js +66 -0
- package/lib/params.js +966 -0
- package/lib/pool.js +391 -0
- package/lib/settings.js +302 -0
- package/lib/sql/compile.js +160 -0
- package/lib/sql/dialect.js +194 -0
- package/lib/sql/parse.js +202 -0
- package/lib/sql/types.js +1071 -0
- package/lib/sqlite-files.js +137 -0
- package/nodes/connection.html +728 -0
- package/nodes/connection.js +179 -0
- package/nodes/editor/ark-pixel.LICENSE.txt +96 -0
- package/nodes/editor/ark-pixel.woff2 +0 -0
- package/nodes/editor/mark.svg +5 -0
- package/nodes/editor/sql-editor.css +604 -0
- package/nodes/editor/sql-editor.js +1490 -0
- package/nodes/editor/sql-model.js +203 -0
- package/nodes/icons/fromcubes-db.svg +24 -0
- package/nodes/query.html +662 -0
- package/nodes/query.js +195 -0
- package/package.json +81 -4
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "fcdb-qs-clickhouse",
|
|
4
|
+
"type": "tab",
|
|
5
|
+
"label": "ClickHouse quick start",
|
|
6
|
+
"disabled": false,
|
|
7
|
+
"info": "**What:** creates the table `fromcubes_demo` on deploy, inserts a row, reads the latest ten back and clears the table — on ClickHouse.\n\n**How:**\n\nStart a local server:\n\n docker run -d --name fromcubes-clickhouse -p 8123:8123 -e CLICKHOUSE_USER=test -e CLICKHOUSE_PASSWORD=test -e CLICKHOUSE_DB=test -e CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1 clickhouse/clickhouse-server:26.11\n\nOpen the **ClickHouse quick start** connection and enter user `test`, password `test` — an example cannot carry credentials.\n\nDeploy, then press the buttons. Both parameters declare their column's type, so `reading: \"abc\"` is refused before it reaches the database.\n\nClickHouse has no auto-increment (`generateSnowflakeID()` makes the id), its `DELETE` needs a `WHERE`, and it does not count the rows a `DELETE` removed — the node shows `done`.\n\n**Expected:** each result in the Debug sidebar and in the Node-RED log (the terminal it runs in); errors under **error**."
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"id": "fcdb-qs-clickhouse-note",
|
|
11
|
+
"type": "comment",
|
|
12
|
+
"z": "fcdb-qs-clickhouse",
|
|
13
|
+
"name": "ClickHouse: create → insert → select → clear (see the tab's info)",
|
|
14
|
+
"info": "**What:** creates the table `fromcubes_demo` on deploy, inserts a row, reads the latest ten back and clears the table — on ClickHouse.\n\n**How:**\n\nStart a local server:\n\n docker run -d --name fromcubes-clickhouse -p 8123:8123 -e CLICKHOUSE_USER=test -e CLICKHOUSE_PASSWORD=test -e CLICKHOUSE_DB=test -e CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1 clickhouse/clickhouse-server:26.11\n\nOpen the **ClickHouse quick start** connection and enter user `test`, password `test` — an example cannot carry credentials.\n\nDeploy, then press the buttons. Both parameters declare their column's type, so `reading: \"abc\"` is refused before it reaches the database.\n\nClickHouse has no auto-increment (`generateSnowflakeID()` makes the id), its `DELETE` needs a `WHERE`, and it does not count the rows a `DELETE` removed — the node shows `done`.\n\n**Expected:** each result in the Debug sidebar and in the Node-RED log (the terminal it runs in); errors under **error**.",
|
|
15
|
+
"x": 260,
|
|
16
|
+
"y": 40,
|
|
17
|
+
"wires": []
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "fcdb-qs-clickhouse-on-deploy",
|
|
21
|
+
"type": "inject",
|
|
22
|
+
"z": "fcdb-qs-clickhouse",
|
|
23
|
+
"name": "on deploy",
|
|
24
|
+
"props": [
|
|
25
|
+
{
|
|
26
|
+
"p": "payload"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"repeat": "",
|
|
30
|
+
"crontab": "",
|
|
31
|
+
"once": true,
|
|
32
|
+
"onceDelay": "1",
|
|
33
|
+
"topic": "",
|
|
34
|
+
"payload": "",
|
|
35
|
+
"payloadType": "date",
|
|
36
|
+
"x": 140,
|
|
37
|
+
"y": 100,
|
|
38
|
+
"wires": [
|
|
39
|
+
[
|
|
40
|
+
"fcdb-qs-clickhouse-create"
|
|
41
|
+
]
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": "fcdb-qs-clickhouse-create",
|
|
46
|
+
"type": "fromcubes-db-query",
|
|
47
|
+
"z": "fcdb-qs-clickhouse",
|
|
48
|
+
"name": "create table",
|
|
49
|
+
"connection": "fcdb-qs-clickhouse-conn",
|
|
50
|
+
"sql": "CREATE TABLE IF NOT EXISTS fromcubes_demo (\n id UInt64 DEFAULT generateSnowflakeID(),\n note String,\n reading Nullable(Float64),\n created_at DateTime64(3) DEFAULT now64(3)\n) ENGINE = MergeTree\nORDER BY id",
|
|
51
|
+
"params": [],
|
|
52
|
+
"output": "count",
|
|
53
|
+
"target": "payload",
|
|
54
|
+
"timeoutMs": "",
|
|
55
|
+
"x": 340,
|
|
56
|
+
"y": 100,
|
|
57
|
+
"wires": [
|
|
58
|
+
[
|
|
59
|
+
"fcdb-qs-clickhouse-debug"
|
|
60
|
+
]
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "fcdb-qs-clickhouse-go",
|
|
65
|
+
"type": "inject",
|
|
66
|
+
"z": "fcdb-qs-clickhouse",
|
|
67
|
+
"name": "insert a row",
|
|
68
|
+
"props": [
|
|
69
|
+
{
|
|
70
|
+
"p": "payload"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"repeat": "",
|
|
74
|
+
"crontab": "",
|
|
75
|
+
"once": false,
|
|
76
|
+
"onceDelay": "0.1",
|
|
77
|
+
"topic": "",
|
|
78
|
+
"payload": "{\"note\":\"hello\",\"reading\":21.5}",
|
|
79
|
+
"payloadType": "json",
|
|
80
|
+
"x": 150,
|
|
81
|
+
"y": 160,
|
|
82
|
+
"wires": [
|
|
83
|
+
[
|
|
84
|
+
"fcdb-qs-clickhouse-insert"
|
|
85
|
+
]
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"id": "fcdb-qs-clickhouse-insert",
|
|
90
|
+
"type": "fromcubes-db-query",
|
|
91
|
+
"z": "fcdb-qs-clickhouse",
|
|
92
|
+
"name": "insert",
|
|
93
|
+
"connection": "fcdb-qs-clickhouse-conn",
|
|
94
|
+
"sql": "INSERT INTO fromcubes_demo (note, reading)\nVALUES (:note, :reading)",
|
|
95
|
+
"params": [
|
|
96
|
+
{
|
|
97
|
+
"name": "note",
|
|
98
|
+
"type": "msg",
|
|
99
|
+
"value": "payload.note",
|
|
100
|
+
"as": "String"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "reading",
|
|
104
|
+
"type": "msg",
|
|
105
|
+
"value": "payload.reading",
|
|
106
|
+
"as": "Nullable",
|
|
107
|
+
"asArgs": "Float64"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"output": "count",
|
|
111
|
+
"target": "inserted",
|
|
112
|
+
"timeoutMs": "",
|
|
113
|
+
"x": 340,
|
|
114
|
+
"y": 160,
|
|
115
|
+
"wires": [
|
|
116
|
+
[
|
|
117
|
+
"fcdb-qs-clickhouse-select"
|
|
118
|
+
]
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"id": "fcdb-qs-clickhouse-read",
|
|
123
|
+
"type": "inject",
|
|
124
|
+
"z": "fcdb-qs-clickhouse",
|
|
125
|
+
"name": "read",
|
|
126
|
+
"props": [
|
|
127
|
+
{
|
|
128
|
+
"p": "payload"
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"repeat": "",
|
|
132
|
+
"crontab": "",
|
|
133
|
+
"once": false,
|
|
134
|
+
"onceDelay": "0.1",
|
|
135
|
+
"topic": "",
|
|
136
|
+
"payload": "",
|
|
137
|
+
"payloadType": "date",
|
|
138
|
+
"x": 130,
|
|
139
|
+
"y": 220,
|
|
140
|
+
"wires": [
|
|
141
|
+
[
|
|
142
|
+
"fcdb-qs-clickhouse-select"
|
|
143
|
+
]
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"id": "fcdb-qs-clickhouse-select",
|
|
148
|
+
"type": "fromcubes-db-query",
|
|
149
|
+
"z": "fcdb-qs-clickhouse",
|
|
150
|
+
"name": "latest 10",
|
|
151
|
+
"connection": "fcdb-qs-clickhouse-conn",
|
|
152
|
+
"sql": "SELECT id, note, reading, created_at\nFROM fromcubes_demo\nORDER BY id DESC\nLIMIT 10",
|
|
153
|
+
"params": [],
|
|
154
|
+
"output": "rows",
|
|
155
|
+
"target": "payload",
|
|
156
|
+
"timeoutMs": "",
|
|
157
|
+
"x": 540,
|
|
158
|
+
"y": 190,
|
|
159
|
+
"wires": [
|
|
160
|
+
[
|
|
161
|
+
"fcdb-qs-clickhouse-debug"
|
|
162
|
+
]
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"id": "fcdb-qs-clickhouse-wipe",
|
|
167
|
+
"type": "inject",
|
|
168
|
+
"z": "fcdb-qs-clickhouse",
|
|
169
|
+
"name": "clear",
|
|
170
|
+
"props": [
|
|
171
|
+
{
|
|
172
|
+
"p": "payload"
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
"repeat": "",
|
|
176
|
+
"crontab": "",
|
|
177
|
+
"once": false,
|
|
178
|
+
"onceDelay": "0.1",
|
|
179
|
+
"topic": "",
|
|
180
|
+
"payload": "",
|
|
181
|
+
"payloadType": "date",
|
|
182
|
+
"x": 130,
|
|
183
|
+
"y": 280,
|
|
184
|
+
"wires": [
|
|
185
|
+
[
|
|
186
|
+
"fcdb-qs-clickhouse-clear"
|
|
187
|
+
]
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"id": "fcdb-qs-clickhouse-clear",
|
|
192
|
+
"type": "fromcubes-db-query",
|
|
193
|
+
"z": "fcdb-qs-clickhouse",
|
|
194
|
+
"name": "clear table",
|
|
195
|
+
"connection": "fcdb-qs-clickhouse-conn",
|
|
196
|
+
"sql": "DELETE FROM fromcubes_demo WHERE 1 = 1",
|
|
197
|
+
"params": [],
|
|
198
|
+
"output": "count",
|
|
199
|
+
"target": "payload",
|
|
200
|
+
"timeoutMs": "",
|
|
201
|
+
"x": 340,
|
|
202
|
+
"y": 280,
|
|
203
|
+
"wires": [
|
|
204
|
+
[
|
|
205
|
+
"fcdb-qs-clickhouse-debug"
|
|
206
|
+
]
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"id": "fcdb-qs-clickhouse-debug",
|
|
211
|
+
"type": "debug",
|
|
212
|
+
"z": "fcdb-qs-clickhouse",
|
|
213
|
+
"name": "ClickHouse",
|
|
214
|
+
"active": true,
|
|
215
|
+
"tosidebar": true,
|
|
216
|
+
"console": true,
|
|
217
|
+
"tostatus": true,
|
|
218
|
+
"complete": "payload",
|
|
219
|
+
"targetType": "msg",
|
|
220
|
+
"statusVal": "payload",
|
|
221
|
+
"statusType": "auto",
|
|
222
|
+
"x": 760,
|
|
223
|
+
"y": 190,
|
|
224
|
+
"wires": []
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"id": "fcdb-qs-clickhouse-catch",
|
|
228
|
+
"type": "catch",
|
|
229
|
+
"z": "fcdb-qs-clickhouse",
|
|
230
|
+
"name": "database errors",
|
|
231
|
+
"scope": null,
|
|
232
|
+
"uncaught": false,
|
|
233
|
+
"x": 140,
|
|
234
|
+
"y": 340,
|
|
235
|
+
"wires": [
|
|
236
|
+
[
|
|
237
|
+
"fcdb-qs-clickhouse-error"
|
|
238
|
+
]
|
|
239
|
+
]
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"id": "fcdb-qs-clickhouse-error",
|
|
243
|
+
"type": "debug",
|
|
244
|
+
"z": "fcdb-qs-clickhouse",
|
|
245
|
+
"name": "error",
|
|
246
|
+
"active": true,
|
|
247
|
+
"tosidebar": true,
|
|
248
|
+
"console": true,
|
|
249
|
+
"tostatus": false,
|
|
250
|
+
"complete": "true",
|
|
251
|
+
"targetType": "full",
|
|
252
|
+
"statusVal": "",
|
|
253
|
+
"statusType": "auto",
|
|
254
|
+
"x": 340,
|
|
255
|
+
"y": 340,
|
|
256
|
+
"wires": []
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"id": "fcdb-qs-clickhouse-conn",
|
|
260
|
+
"type": "fromcubes-db-connection",
|
|
261
|
+
"name": "ClickHouse quick start",
|
|
262
|
+
"dialect": "clickhouse",
|
|
263
|
+
"userSource": "cred",
|
|
264
|
+
"passwordSource": "cred",
|
|
265
|
+
"poolMin": 0,
|
|
266
|
+
"poolMax": 10,
|
|
267
|
+
"idleTimeoutMs": 30000,
|
|
268
|
+
"connectTimeoutMs": 15000,
|
|
269
|
+
"queryTimeoutMs": 30000,
|
|
270
|
+
"queueMax": 100,
|
|
271
|
+
"undefinedAsNull": false,
|
|
272
|
+
"options": "",
|
|
273
|
+
"host": "localhost",
|
|
274
|
+
"port": 8123,
|
|
275
|
+
"database": "test",
|
|
276
|
+
"chTls": false
|
|
277
|
+
}
|
|
278
|
+
]
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "fcdb-qs-cockroachdb",
|
|
4
|
+
"type": "tab",
|
|
5
|
+
"label": "CockroachDB quick start",
|
|
6
|
+
"disabled": false,
|
|
7
|
+
"info": "**What:** creates the table `fromcubes_demo` on deploy, inserts a row, reads the latest ten back and clears the table — on CockroachDB.\n\n**How:**\n\nStart a local server:\n\n docker run -d --name fromcubes-cockroachdb -p 26257:26257 cockroachdb/cockroach:v26.4.1 start-single-node --insecure --accept-sql-without-tls\n\nOpen the **CockroachDB quick start** connection and enter user `root`, no password — an example cannot carry credentials.\n\nDeploy, then press the buttons. Both parameters declare their column's type, so `reading: \"abc\"` is refused before it reaches the database.\n\n**Expected:** each result in the Debug sidebar and in the Node-RED log (the terminal it runs in); errors under **error**."
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"id": "fcdb-qs-cockroachdb-note",
|
|
11
|
+
"type": "comment",
|
|
12
|
+
"z": "fcdb-qs-cockroachdb",
|
|
13
|
+
"name": "CockroachDB: create → insert → select → clear (see the tab's info)",
|
|
14
|
+
"info": "**What:** creates the table `fromcubes_demo` on deploy, inserts a row, reads the latest ten back and clears the table — on CockroachDB.\n\n**How:**\n\nStart a local server:\n\n docker run -d --name fromcubes-cockroachdb -p 26257:26257 cockroachdb/cockroach:v26.4.1 start-single-node --insecure --accept-sql-without-tls\n\nOpen the **CockroachDB quick start** connection and enter user `root`, no password — an example cannot carry credentials.\n\nDeploy, then press the buttons. Both parameters declare their column's type, so `reading: \"abc\"` is refused before it reaches the database.\n\n**Expected:** each result in the Debug sidebar and in the Node-RED log (the terminal it runs in); errors under **error**.",
|
|
15
|
+
"x": 260,
|
|
16
|
+
"y": 40,
|
|
17
|
+
"wires": []
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "fcdb-qs-cockroachdb-on-deploy",
|
|
21
|
+
"type": "inject",
|
|
22
|
+
"z": "fcdb-qs-cockroachdb",
|
|
23
|
+
"name": "on deploy",
|
|
24
|
+
"props": [
|
|
25
|
+
{
|
|
26
|
+
"p": "payload"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"repeat": "",
|
|
30
|
+
"crontab": "",
|
|
31
|
+
"once": true,
|
|
32
|
+
"onceDelay": "1",
|
|
33
|
+
"topic": "",
|
|
34
|
+
"payload": "",
|
|
35
|
+
"payloadType": "date",
|
|
36
|
+
"x": 140,
|
|
37
|
+
"y": 100,
|
|
38
|
+
"wires": [
|
|
39
|
+
[
|
|
40
|
+
"fcdb-qs-cockroachdb-create"
|
|
41
|
+
]
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": "fcdb-qs-cockroachdb-create",
|
|
46
|
+
"type": "fromcubes-db-query",
|
|
47
|
+
"z": "fcdb-qs-cockroachdb",
|
|
48
|
+
"name": "create table",
|
|
49
|
+
"connection": "fcdb-qs-cockroachdb-conn",
|
|
50
|
+
"sql": "CREATE TABLE IF NOT EXISTS fromcubes_demo (\n id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,\n note TEXT NOT NULL,\n reading DOUBLE PRECISION,\n created_at TIMESTAMPTZ NOT NULL DEFAULT now()\n)",
|
|
51
|
+
"params": [],
|
|
52
|
+
"output": "count",
|
|
53
|
+
"target": "payload",
|
|
54
|
+
"timeoutMs": "",
|
|
55
|
+
"x": 340,
|
|
56
|
+
"y": 100,
|
|
57
|
+
"wires": [
|
|
58
|
+
[
|
|
59
|
+
"fcdb-qs-cockroachdb-debug"
|
|
60
|
+
]
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "fcdb-qs-cockroachdb-go",
|
|
65
|
+
"type": "inject",
|
|
66
|
+
"z": "fcdb-qs-cockroachdb",
|
|
67
|
+
"name": "insert a row",
|
|
68
|
+
"props": [
|
|
69
|
+
{
|
|
70
|
+
"p": "payload"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"repeat": "",
|
|
74
|
+
"crontab": "",
|
|
75
|
+
"once": false,
|
|
76
|
+
"onceDelay": "0.1",
|
|
77
|
+
"topic": "",
|
|
78
|
+
"payload": "{\"note\":\"hello\",\"reading\":21.5}",
|
|
79
|
+
"payloadType": "json",
|
|
80
|
+
"x": 150,
|
|
81
|
+
"y": 160,
|
|
82
|
+
"wires": [
|
|
83
|
+
[
|
|
84
|
+
"fcdb-qs-cockroachdb-insert"
|
|
85
|
+
]
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"id": "fcdb-qs-cockroachdb-insert",
|
|
90
|
+
"type": "fromcubes-db-query",
|
|
91
|
+
"z": "fcdb-qs-cockroachdb",
|
|
92
|
+
"name": "insert",
|
|
93
|
+
"connection": "fcdb-qs-cockroachdb-conn",
|
|
94
|
+
"sql": "INSERT INTO fromcubes_demo (note, reading)\nVALUES (:note, :reading)",
|
|
95
|
+
"params": [
|
|
96
|
+
{
|
|
97
|
+
"name": "note",
|
|
98
|
+
"type": "msg",
|
|
99
|
+
"value": "payload.note",
|
|
100
|
+
"as": "text"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "reading",
|
|
104
|
+
"type": "msg",
|
|
105
|
+
"value": "payload.reading",
|
|
106
|
+
"as": "double precision"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"output": "count",
|
|
110
|
+
"target": "inserted",
|
|
111
|
+
"timeoutMs": "",
|
|
112
|
+
"x": 340,
|
|
113
|
+
"y": 160,
|
|
114
|
+
"wires": [
|
|
115
|
+
[
|
|
116
|
+
"fcdb-qs-cockroachdb-select"
|
|
117
|
+
]
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"id": "fcdb-qs-cockroachdb-read",
|
|
122
|
+
"type": "inject",
|
|
123
|
+
"z": "fcdb-qs-cockroachdb",
|
|
124
|
+
"name": "read",
|
|
125
|
+
"props": [
|
|
126
|
+
{
|
|
127
|
+
"p": "payload"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"repeat": "",
|
|
131
|
+
"crontab": "",
|
|
132
|
+
"once": false,
|
|
133
|
+
"onceDelay": "0.1",
|
|
134
|
+
"topic": "",
|
|
135
|
+
"payload": "",
|
|
136
|
+
"payloadType": "date",
|
|
137
|
+
"x": 130,
|
|
138
|
+
"y": 220,
|
|
139
|
+
"wires": [
|
|
140
|
+
[
|
|
141
|
+
"fcdb-qs-cockroachdb-select"
|
|
142
|
+
]
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"id": "fcdb-qs-cockroachdb-select",
|
|
147
|
+
"type": "fromcubes-db-query",
|
|
148
|
+
"z": "fcdb-qs-cockroachdb",
|
|
149
|
+
"name": "latest 10",
|
|
150
|
+
"connection": "fcdb-qs-cockroachdb-conn",
|
|
151
|
+
"sql": "SELECT id, note, reading, created_at\nFROM fromcubes_demo\nORDER BY id DESC\nLIMIT 10",
|
|
152
|
+
"params": [],
|
|
153
|
+
"output": "rows",
|
|
154
|
+
"target": "payload",
|
|
155
|
+
"timeoutMs": "",
|
|
156
|
+
"x": 540,
|
|
157
|
+
"y": 190,
|
|
158
|
+
"wires": [
|
|
159
|
+
[
|
|
160
|
+
"fcdb-qs-cockroachdb-debug"
|
|
161
|
+
]
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"id": "fcdb-qs-cockroachdb-wipe",
|
|
166
|
+
"type": "inject",
|
|
167
|
+
"z": "fcdb-qs-cockroachdb",
|
|
168
|
+
"name": "clear",
|
|
169
|
+
"props": [
|
|
170
|
+
{
|
|
171
|
+
"p": "payload"
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"repeat": "",
|
|
175
|
+
"crontab": "",
|
|
176
|
+
"once": false,
|
|
177
|
+
"onceDelay": "0.1",
|
|
178
|
+
"topic": "",
|
|
179
|
+
"payload": "",
|
|
180
|
+
"payloadType": "date",
|
|
181
|
+
"x": 130,
|
|
182
|
+
"y": 280,
|
|
183
|
+
"wires": [
|
|
184
|
+
[
|
|
185
|
+
"fcdb-qs-cockroachdb-clear"
|
|
186
|
+
]
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"id": "fcdb-qs-cockroachdb-clear",
|
|
191
|
+
"type": "fromcubes-db-query",
|
|
192
|
+
"z": "fcdb-qs-cockroachdb",
|
|
193
|
+
"name": "clear table",
|
|
194
|
+
"connection": "fcdb-qs-cockroachdb-conn",
|
|
195
|
+
"sql": "DELETE FROM fromcubes_demo",
|
|
196
|
+
"params": [],
|
|
197
|
+
"output": "count",
|
|
198
|
+
"target": "payload",
|
|
199
|
+
"timeoutMs": "",
|
|
200
|
+
"x": 340,
|
|
201
|
+
"y": 280,
|
|
202
|
+
"wires": [
|
|
203
|
+
[
|
|
204
|
+
"fcdb-qs-cockroachdb-debug"
|
|
205
|
+
]
|
|
206
|
+
]
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"id": "fcdb-qs-cockroachdb-debug",
|
|
210
|
+
"type": "debug",
|
|
211
|
+
"z": "fcdb-qs-cockroachdb",
|
|
212
|
+
"name": "CockroachDB",
|
|
213
|
+
"active": true,
|
|
214
|
+
"tosidebar": true,
|
|
215
|
+
"console": true,
|
|
216
|
+
"tostatus": true,
|
|
217
|
+
"complete": "payload",
|
|
218
|
+
"targetType": "msg",
|
|
219
|
+
"statusVal": "payload",
|
|
220
|
+
"statusType": "auto",
|
|
221
|
+
"x": 760,
|
|
222
|
+
"y": 190,
|
|
223
|
+
"wires": []
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"id": "fcdb-qs-cockroachdb-catch",
|
|
227
|
+
"type": "catch",
|
|
228
|
+
"z": "fcdb-qs-cockroachdb",
|
|
229
|
+
"name": "database errors",
|
|
230
|
+
"scope": null,
|
|
231
|
+
"uncaught": false,
|
|
232
|
+
"x": 140,
|
|
233
|
+
"y": 340,
|
|
234
|
+
"wires": [
|
|
235
|
+
[
|
|
236
|
+
"fcdb-qs-cockroachdb-error"
|
|
237
|
+
]
|
|
238
|
+
]
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"id": "fcdb-qs-cockroachdb-error",
|
|
242
|
+
"type": "debug",
|
|
243
|
+
"z": "fcdb-qs-cockroachdb",
|
|
244
|
+
"name": "error",
|
|
245
|
+
"active": true,
|
|
246
|
+
"tosidebar": true,
|
|
247
|
+
"console": true,
|
|
248
|
+
"tostatus": false,
|
|
249
|
+
"complete": "true",
|
|
250
|
+
"targetType": "full",
|
|
251
|
+
"statusVal": "",
|
|
252
|
+
"statusType": "auto",
|
|
253
|
+
"x": 340,
|
|
254
|
+
"y": 340,
|
|
255
|
+
"wires": []
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"id": "fcdb-qs-cockroachdb-conn",
|
|
259
|
+
"type": "fromcubes-db-connection",
|
|
260
|
+
"name": "CockroachDB quick start",
|
|
261
|
+
"dialect": "cockroachdb",
|
|
262
|
+
"userSource": "cred",
|
|
263
|
+
"passwordSource": "cred",
|
|
264
|
+
"poolMin": 0,
|
|
265
|
+
"poolMax": 10,
|
|
266
|
+
"idleTimeoutMs": 30000,
|
|
267
|
+
"connectTimeoutMs": 15000,
|
|
268
|
+
"queryTimeoutMs": 30000,
|
|
269
|
+
"queueMax": 100,
|
|
270
|
+
"undefinedAsNull": false,
|
|
271
|
+
"options": "",
|
|
272
|
+
"host": "localhost",
|
|
273
|
+
"port": 26257,
|
|
274
|
+
"database": "defaultdb",
|
|
275
|
+
"pgSsl": "disable",
|
|
276
|
+
"pgCa": "",
|
|
277
|
+
"pgSchema": "",
|
|
278
|
+
"appName": ""
|
|
279
|
+
}
|
|
280
|
+
]
|