@aaqu/fromcubes-db 0.0.0-stage → 0.1.1
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,281 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "fcdb-qs-mysql",
|
|
4
|
+
"type": "tab",
|
|
5
|
+
"label": "MySQL 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 MySQL.\n\n**How:**\n\nStart a local server:\n\n docker run -d --name fromcubes-mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=test -e MYSQL_USER=test -e MYSQL_PASSWORD=test mysql:26.10\n\nOpen the **MySQL 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\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-mysql-note",
|
|
11
|
+
"type": "comment",
|
|
12
|
+
"z": "fcdb-qs-mysql",
|
|
13
|
+
"name": "MySQL: 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 MySQL.\n\n**How:**\n\nStart a local server:\n\n docker run -d --name fromcubes-mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=test -e MYSQL_USER=test -e MYSQL_PASSWORD=test mysql:26.10\n\nOpen the **MySQL 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\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-mysql-on-deploy",
|
|
21
|
+
"type": "inject",
|
|
22
|
+
"z": "fcdb-qs-mysql",
|
|
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-mysql-create"
|
|
41
|
+
]
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": "fcdb-qs-mysql-create",
|
|
46
|
+
"type": "fromcubes-db-query",
|
|
47
|
+
"z": "fcdb-qs-mysql",
|
|
48
|
+
"name": "create table",
|
|
49
|
+
"connection": "fcdb-qs-mysql-conn",
|
|
50
|
+
"sql": "CREATE TABLE IF NOT EXISTS fromcubes_demo (\n id BIGINT AUTO_INCREMENT PRIMARY KEY,\n note VARCHAR(200) NOT NULL,\n reading DOUBLE,\n created_at TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3)\n)",
|
|
51
|
+
"params": [],
|
|
52
|
+
"output": "count",
|
|
53
|
+
"target": "payload",
|
|
54
|
+
"timeoutMs": "",
|
|
55
|
+
"x": 340,
|
|
56
|
+
"y": 100,
|
|
57
|
+
"wires": [
|
|
58
|
+
[
|
|
59
|
+
"fcdb-qs-mysql-debug"
|
|
60
|
+
]
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "fcdb-qs-mysql-go",
|
|
65
|
+
"type": "inject",
|
|
66
|
+
"z": "fcdb-qs-mysql",
|
|
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-mysql-insert"
|
|
85
|
+
]
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"id": "fcdb-qs-mysql-insert",
|
|
90
|
+
"type": "fromcubes-db-query",
|
|
91
|
+
"z": "fcdb-qs-mysql",
|
|
92
|
+
"name": "insert",
|
|
93
|
+
"connection": "fcdb-qs-mysql-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": "varchar",
|
|
101
|
+
"asArgs": "200"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"name": "reading",
|
|
105
|
+
"type": "msg",
|
|
106
|
+
"value": "payload.reading",
|
|
107
|
+
"as": "double"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"output": "count",
|
|
111
|
+
"target": "inserted",
|
|
112
|
+
"timeoutMs": "",
|
|
113
|
+
"x": 340,
|
|
114
|
+
"y": 160,
|
|
115
|
+
"wires": [
|
|
116
|
+
[
|
|
117
|
+
"fcdb-qs-mysql-select"
|
|
118
|
+
]
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"id": "fcdb-qs-mysql-read",
|
|
123
|
+
"type": "inject",
|
|
124
|
+
"z": "fcdb-qs-mysql",
|
|
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-mysql-select"
|
|
143
|
+
]
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"id": "fcdb-qs-mysql-select",
|
|
148
|
+
"type": "fromcubes-db-query",
|
|
149
|
+
"z": "fcdb-qs-mysql",
|
|
150
|
+
"name": "latest 10",
|
|
151
|
+
"connection": "fcdb-qs-mysql-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-mysql-debug"
|
|
162
|
+
]
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"id": "fcdb-qs-mysql-wipe",
|
|
167
|
+
"type": "inject",
|
|
168
|
+
"z": "fcdb-qs-mysql",
|
|
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-mysql-clear"
|
|
187
|
+
]
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"id": "fcdb-qs-mysql-clear",
|
|
192
|
+
"type": "fromcubes-db-query",
|
|
193
|
+
"z": "fcdb-qs-mysql",
|
|
194
|
+
"name": "clear table",
|
|
195
|
+
"connection": "fcdb-qs-mysql-conn",
|
|
196
|
+
"sql": "DELETE FROM fromcubes_demo",
|
|
197
|
+
"params": [],
|
|
198
|
+
"output": "count",
|
|
199
|
+
"target": "payload",
|
|
200
|
+
"timeoutMs": "",
|
|
201
|
+
"x": 340,
|
|
202
|
+
"y": 280,
|
|
203
|
+
"wires": [
|
|
204
|
+
[
|
|
205
|
+
"fcdb-qs-mysql-debug"
|
|
206
|
+
]
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"id": "fcdb-qs-mysql-debug",
|
|
211
|
+
"type": "debug",
|
|
212
|
+
"z": "fcdb-qs-mysql",
|
|
213
|
+
"name": "MySQL",
|
|
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-mysql-catch",
|
|
228
|
+
"type": "catch",
|
|
229
|
+
"z": "fcdb-qs-mysql",
|
|
230
|
+
"name": "database errors",
|
|
231
|
+
"scope": null,
|
|
232
|
+
"uncaught": false,
|
|
233
|
+
"x": 140,
|
|
234
|
+
"y": 340,
|
|
235
|
+
"wires": [
|
|
236
|
+
[
|
|
237
|
+
"fcdb-qs-mysql-error"
|
|
238
|
+
]
|
|
239
|
+
]
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"id": "fcdb-qs-mysql-error",
|
|
243
|
+
"type": "debug",
|
|
244
|
+
"z": "fcdb-qs-mysql",
|
|
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-mysql-conn",
|
|
260
|
+
"type": "fromcubes-db-connection",
|
|
261
|
+
"name": "MySQL quick start",
|
|
262
|
+
"dialect": "mysql",
|
|
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": 3306,
|
|
275
|
+
"database": "test",
|
|
276
|
+
"mySsl": false,
|
|
277
|
+
"mySslVerify": true,
|
|
278
|
+
"myCharset": "",
|
|
279
|
+
"myTimezone": ""
|
|
280
|
+
}
|
|
281
|
+
]
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "fcdb-qs-oracle",
|
|
4
|
+
"type": "tab",
|
|
5
|
+
"label": "Oracle 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 Oracle.\n\n**How:**\n\nStart a local server:\n\n docker run -d --name fromcubes-oracle -p 1521:1521 -e ORACLE_PASSWORD=test -e APP_USER=test -e APP_USER_PASSWORD=test gvenzl/oracle-free:23.26.4-slim-faststart\n\nOpen the **Oracle 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\n`CREATE TABLE IF NOT EXISTS` needs Oracle 23ai or later.\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-oracle-note",
|
|
11
|
+
"type": "comment",
|
|
12
|
+
"z": "fcdb-qs-oracle",
|
|
13
|
+
"name": "Oracle: 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 Oracle.\n\n**How:**\n\nStart a local server:\n\n docker run -d --name fromcubes-oracle -p 1521:1521 -e ORACLE_PASSWORD=test -e APP_USER=test -e APP_USER_PASSWORD=test gvenzl/oracle-free:23.26.4-slim-faststart\n\nOpen the **Oracle 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\n`CREATE TABLE IF NOT EXISTS` needs Oracle 23ai or later.\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-oracle-on-deploy",
|
|
21
|
+
"type": "inject",
|
|
22
|
+
"z": "fcdb-qs-oracle",
|
|
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-oracle-create"
|
|
41
|
+
]
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": "fcdb-qs-oracle-create",
|
|
46
|
+
"type": "fromcubes-db-query",
|
|
47
|
+
"z": "fcdb-qs-oracle",
|
|
48
|
+
"name": "create table",
|
|
49
|
+
"connection": "fcdb-qs-oracle-conn",
|
|
50
|
+
"sql": "CREATE TABLE IF NOT EXISTS fromcubes_demo (\n id NUMBER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,\n note VARCHAR2(200 CHAR) NOT NULL,\n reading BINARY_DOUBLE,\n created_at TIMESTAMP DEFAULT SYS_EXTRACT_UTC(SYSTIMESTAMP) NOT NULL\n)",
|
|
51
|
+
"params": [],
|
|
52
|
+
"output": "count",
|
|
53
|
+
"target": "payload",
|
|
54
|
+
"timeoutMs": "",
|
|
55
|
+
"x": 340,
|
|
56
|
+
"y": 100,
|
|
57
|
+
"wires": [
|
|
58
|
+
[
|
|
59
|
+
"fcdb-qs-oracle-debug"
|
|
60
|
+
]
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "fcdb-qs-oracle-go",
|
|
65
|
+
"type": "inject",
|
|
66
|
+
"z": "fcdb-qs-oracle",
|
|
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-oracle-insert"
|
|
85
|
+
]
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"id": "fcdb-qs-oracle-insert",
|
|
90
|
+
"type": "fromcubes-db-query",
|
|
91
|
+
"z": "fcdb-qs-oracle",
|
|
92
|
+
"name": "insert",
|
|
93
|
+
"connection": "fcdb-qs-oracle-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": "varchar2",
|
|
101
|
+
"asArgs": "200"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"name": "reading",
|
|
105
|
+
"type": "msg",
|
|
106
|
+
"value": "payload.reading",
|
|
107
|
+
"as": "binary_double"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"output": "count",
|
|
111
|
+
"target": "inserted",
|
|
112
|
+
"timeoutMs": "",
|
|
113
|
+
"x": 340,
|
|
114
|
+
"y": 160,
|
|
115
|
+
"wires": [
|
|
116
|
+
[
|
|
117
|
+
"fcdb-qs-oracle-select"
|
|
118
|
+
]
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"id": "fcdb-qs-oracle-read",
|
|
123
|
+
"type": "inject",
|
|
124
|
+
"z": "fcdb-qs-oracle",
|
|
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-oracle-select"
|
|
143
|
+
]
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"id": "fcdb-qs-oracle-select",
|
|
148
|
+
"type": "fromcubes-db-query",
|
|
149
|
+
"z": "fcdb-qs-oracle",
|
|
150
|
+
"name": "latest 10",
|
|
151
|
+
"connection": "fcdb-qs-oracle-conn",
|
|
152
|
+
"sql": "SELECT id AS \"id\", note AS \"note\", reading AS \"reading\", created_at AS \"created_at\"\nFROM fromcubes_demo\nORDER BY id DESC\nFETCH FIRST 10 ROWS ONLY",
|
|
153
|
+
"params": [],
|
|
154
|
+
"output": "rows",
|
|
155
|
+
"target": "payload",
|
|
156
|
+
"timeoutMs": "",
|
|
157
|
+
"x": 540,
|
|
158
|
+
"y": 190,
|
|
159
|
+
"wires": [
|
|
160
|
+
[
|
|
161
|
+
"fcdb-qs-oracle-debug"
|
|
162
|
+
]
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"id": "fcdb-qs-oracle-wipe",
|
|
167
|
+
"type": "inject",
|
|
168
|
+
"z": "fcdb-qs-oracle",
|
|
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-oracle-clear"
|
|
187
|
+
]
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"id": "fcdb-qs-oracle-clear",
|
|
192
|
+
"type": "fromcubes-db-query",
|
|
193
|
+
"z": "fcdb-qs-oracle",
|
|
194
|
+
"name": "clear table",
|
|
195
|
+
"connection": "fcdb-qs-oracle-conn",
|
|
196
|
+
"sql": "DELETE FROM fromcubes_demo",
|
|
197
|
+
"params": [],
|
|
198
|
+
"output": "count",
|
|
199
|
+
"target": "payload",
|
|
200
|
+
"timeoutMs": "",
|
|
201
|
+
"x": 340,
|
|
202
|
+
"y": 280,
|
|
203
|
+
"wires": [
|
|
204
|
+
[
|
|
205
|
+
"fcdb-qs-oracle-debug"
|
|
206
|
+
]
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"id": "fcdb-qs-oracle-debug",
|
|
211
|
+
"type": "debug",
|
|
212
|
+
"z": "fcdb-qs-oracle",
|
|
213
|
+
"name": "Oracle",
|
|
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-oracle-catch",
|
|
228
|
+
"type": "catch",
|
|
229
|
+
"z": "fcdb-qs-oracle",
|
|
230
|
+
"name": "database errors",
|
|
231
|
+
"scope": null,
|
|
232
|
+
"uncaught": false,
|
|
233
|
+
"x": 140,
|
|
234
|
+
"y": 340,
|
|
235
|
+
"wires": [
|
|
236
|
+
[
|
|
237
|
+
"fcdb-qs-oracle-error"
|
|
238
|
+
]
|
|
239
|
+
]
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"id": "fcdb-qs-oracle-error",
|
|
243
|
+
"type": "debug",
|
|
244
|
+
"z": "fcdb-qs-oracle",
|
|
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-oracle-conn",
|
|
260
|
+
"type": "fromcubes-db-connection",
|
|
261
|
+
"name": "Oracle quick start",
|
|
262
|
+
"dialect": "oracle",
|
|
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": 1521,
|
|
275
|
+
"database": "FREEPDB1",
|
|
276
|
+
"oraMode": "easy",
|
|
277
|
+
"oraConnectString": "",
|
|
278
|
+
"oraIdentifier": "service"
|
|
279
|
+
}
|
|
280
|
+
]
|