n8n-nodes-base 0.221.0 → 0.223.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/dist/build.tsbuildinfo +1 -1
- package/dist/credentials/GoogleApi.credentials.d.ts +2 -1
- package/dist/credentials/GoogleApi.credentials.js +85 -1
- package/dist/credentials/GoogleApi.credentials.js.map +1 -1
- package/dist/credentials/MySql.credentials.js +115 -0
- package/dist/credentials/MySql.credentials.js.map +1 -1
- package/dist/credentials/NocoDbApiToken.credentials.d.ts +2 -1
- package/dist/credentials/NocoDbApiToken.credentials.js +6 -0
- package/dist/credentials/NocoDbApiToken.credentials.js.map +1 -1
- package/dist/credentials/TotpApi.credentials.d.ts +7 -0
- package/dist/credentials/TotpApi.credentials.js +33 -0
- package/dist/credentials/TotpApi.credentials.js.map +1 -0
- package/dist/known/credentials.json +8 -0
- package/dist/known/nodes.json +4 -0
- package/dist/methods/defined.json +1037 -0
- package/dist/methods/referenced.json +1007 -0
- package/dist/nodes/Aws/S3/FileDescription.js +1 -1
- package/dist/nodes/Aws/S3/FileDescription.js.map +1 -1
- package/dist/nodes/Code/Code.node.js +13 -12
- package/dist/nodes/Code/Code.node.js.map +1 -1
- package/dist/nodes/Code/Sandbox.d.ts +14 -14
- package/dist/nodes/Code/Sandbox.js +35 -75
- package/dist/nodes/Code/Sandbox.js.map +1 -1
- package/dist/nodes/Code/utils.js +1 -1
- package/dist/nodes/Code/utils.js.map +1 -1
- package/dist/nodes/FreshworksCrm/descriptions/ContactDescription.js +0 -9
- package/dist/nodes/FreshworksCrm/descriptions/ContactDescription.js.map +1 -1
- package/dist/nodes/Github/GithubTrigger.node.js +0 -5
- package/dist/nodes/Github/GithubTrigger.node.js.map +1 -1
- package/dist/nodes/Gitlab/Gitlab.node.js +34 -3
- package/dist/nodes/Gitlab/Gitlab.node.js.map +1 -1
- package/dist/nodes/Google/Sheet/v2/transport/index.js +3 -2
- package/dist/nodes/Google/Sheet/v2/transport/index.js.map +1 -1
- package/dist/nodes/HttpRequest/V1/HttpRequestV1.node.js +1 -1
- package/dist/nodes/HttpRequest/V1/HttpRequestV1.node.js.map +1 -1
- package/dist/nodes/HttpRequest/V2/HttpRequestV2.node.js +1 -1
- package/dist/nodes/HttpRequest/V2/HttpRequestV2.node.js.map +1 -1
- package/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js +15 -4
- package/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js.map +1 -1
- package/dist/nodes/If/If.node.js +2 -2
- package/dist/nodes/If/If.node.js.map +1 -1
- package/dist/nodes/MySql/MySql.node.d.ts +3 -13
- package/dist/nodes/MySql/MySql.node.js +9 -325
- package/dist/nodes/MySql/MySql.node.js.map +1 -1
- package/dist/nodes/MySql/v1/GenericFunctions.js.map +1 -0
- package/dist/nodes/MySql/v1/MySqlV1.node.d.ts +16 -0
- package/dist/nodes/MySql/v1/MySqlV1.node.js +351 -0
- package/dist/nodes/MySql/v1/MySqlV1.node.js.map +1 -0
- package/dist/nodes/MySql/v2/MySqlV2.node.d.ts +13 -0
- package/dist/nodes/MySql/v2/MySqlV2.node.js +20 -0
- package/dist/nodes/MySql/v2/MySqlV2.node.js.map +1 -0
- package/dist/nodes/MySql/v2/actions/common.descriptions.d.ts +6 -0
- package/dist/nodes/MySql/v2/actions/common.descriptions.js +341 -0
- package/dist/nodes/MySql/v2/actions/common.descriptions.js.map +1 -0
- package/dist/nodes/MySql/v2/actions/database/Database.resource.d.ts +9 -0
- package/dist/nodes/MySql/v2/actions/database/Database.resource.js +102 -0
- package/dist/nodes/MySql/v2/actions/database/Database.resource.js.map +1 -0
- package/dist/nodes/MySql/v2/actions/database/deleteTable.operation.d.ts +24 -0
- package/dist/nodes/MySql/v2/actions/database/deleteTable.operation.js +91 -0
- package/dist/nodes/MySql/v2/actions/database/deleteTable.operation.js.map +1 -0
- package/dist/nodes/MySql/v2/actions/database/executeQuery.operation.d.ts +24 -0
- package/dist/nodes/MySql/v2/actions/database/executeQuery.operation.js +64 -0
- package/dist/nodes/MySql/v2/actions/database/executeQuery.operation.js.map +1 -0
- package/dist/nodes/MySql/v2/actions/database/insert.operation.d.ts +24 -0
- package/dist/nodes/MySql/v2/actions/database/insert.operation.js +175 -0
- package/dist/nodes/MySql/v2/actions/database/insert.operation.js.map +1 -0
- package/dist/nodes/MySql/v2/actions/database/select.operation.d.ts +24 -0
- package/dist/nodes/MySql/v2/actions/database/select.operation.js +87 -0
- package/dist/nodes/MySql/v2/actions/database/select.operation.js.map +1 -0
- package/dist/nodes/MySql/v2/actions/database/update.operation.d.ts +24 -0
- package/dist/nodes/MySql/v2/actions/database/update.operation.js +160 -0
- package/dist/nodes/MySql/v2/actions/database/update.operation.js.map +1 -0
- package/dist/nodes/MySql/v2/actions/database/upsert.operation.d.ts +24 -0
- package/dist/nodes/MySql/v2/actions/database/upsert.operation.js +161 -0
- package/dist/nodes/MySql/v2/actions/database/upsert.operation.js.map +1 -0
- package/dist/nodes/MySql/v2/actions/node.type.d.ts +7 -0
- package/dist/nodes/MySql/v2/actions/node.type.js +3 -0
- package/dist/nodes/MySql/v2/actions/node.type.js.map +1 -0
- package/dist/nodes/MySql/v2/actions/router.d.ts +3 -0
- package/dist/nodes/MySql/v2/actions/router.js +70 -0
- package/dist/nodes/MySql/v2/actions/router.js.map +1 -0
- package/dist/nodes/MySql/v2/actions/versionDescription.d.ts +2 -0
- package/dist/nodes/MySql/v2/actions/versionDescription.js +65 -0
- package/dist/nodes/MySql/v2/actions/versionDescription.js.map +1 -0
- package/dist/nodes/MySql/v2/helpers/interfaces.d.ts +35 -0
- package/dist/nodes/MySql/v2/helpers/interfaces.js +14 -0
- package/dist/nodes/MySql/v2/helpers/interfaces.js.map +1 -0
- package/dist/nodes/MySql/v2/helpers/utils.d.ts +18 -0
- package/dist/nodes/MySql/v2/helpers/utils.js +288 -0
- package/dist/nodes/MySql/v2/helpers/utils.js.map +1 -0
- package/dist/nodes/MySql/v2/methods/credentialTest.d.ts +2 -0
- package/dist/nodes/MySql/v2/methods/credentialTest.js +35 -0
- package/dist/nodes/MySql/v2/methods/credentialTest.js.map +1 -0
- package/dist/nodes/MySql/v2/methods/index.d.ts +3 -0
- package/dist/nodes/MySql/v2/methods/index.js +30 -0
- package/dist/nodes/MySql/v2/methods/index.js.map +1 -0
- package/dist/nodes/MySql/v2/methods/listSearch.d.ts +2 -0
- package/dist/nodes/MySql/v2/methods/listSearch.js +38 -0
- package/dist/nodes/MySql/v2/methods/listSearch.js.map +1 -0
- package/dist/nodes/MySql/v2/methods/loadOptions.d.ts +4 -0
- package/dist/nodes/MySql/v2/methods/loadOptions.js +50 -0
- package/dist/nodes/MySql/v2/methods/loadOptions.js.map +1 -0
- package/dist/nodes/MySql/v2/transport/index.d.ts +4 -0
- package/dist/nodes/MySql/v2/transport/index.js +102 -0
- package/dist/nodes/MySql/v2/transport/index.js.map +1 -0
- package/dist/nodes/NocoDB/NocoDB.node.js +12 -2
- package/dist/nodes/NocoDB/NocoDB.node.js.map +1 -1
- package/dist/nodes/NocoDB/OperationDescription.js +44 -30
- package/dist/nodes/NocoDB/OperationDescription.js.map +1 -1
- package/dist/nodes/OpenAi/ChatDescription.js +39 -26
- package/dist/nodes/OpenAi/ChatDescription.js.map +1 -1
- package/dist/nodes/OpenAi/TextDescription.js +2 -2
- package/dist/nodes/OpenAi/TextDescription.js.map +1 -1
- package/dist/nodes/Paddle/PaymentDescription.js +1 -1
- package/dist/nodes/Paddle/PaymentDescription.js.map +1 -1
- package/dist/nodes/Totp/Totp.node.d.ts +5 -0
- package/dist/nodes/Totp/Totp.node.js +157 -0
- package/dist/nodes/Totp/Totp.node.js.map +1 -0
- package/dist/nodes/Totp/Totp.node.json +16 -0
- package/dist/nodes/Totp/test/Totp.workflow.test.json +41 -0
- package/dist/nodes/Wait/test/Wait.workflow.json +162 -0
- package/dist/types/credentials.json +4 -3
- package/dist/types/nodes.json +15 -13
- package/package.json +10 -7
- package/dist/nodes/MySql/GenericFunctions.js.map +0 -1
- /package/dist/nodes/MySql/{GenericFunctions.d.ts → v1/GenericFunctions.d.ts} +0 -0
- /package/dist/nodes/MySql/{GenericFunctions.js → v1/GenericFunctions.js} +0 -0
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.combineConditionsCollection = exports.sortFixedCollection = exports.selectRowsFixedCollection = exports.optionsCollection = exports.tableRLC = void 0;
|
|
4
|
+
const interfaces_1 = require("../helpers/interfaces");
|
|
5
|
+
exports.tableRLC = {
|
|
6
|
+
displayName: 'Table',
|
|
7
|
+
name: 'table',
|
|
8
|
+
type: 'resourceLocator',
|
|
9
|
+
default: { mode: 'list', value: '' },
|
|
10
|
+
required: true,
|
|
11
|
+
description: 'The table you want to work on',
|
|
12
|
+
modes: [
|
|
13
|
+
{
|
|
14
|
+
displayName: 'From List',
|
|
15
|
+
name: 'list',
|
|
16
|
+
type: 'list',
|
|
17
|
+
placeholder: 'Select a Table...',
|
|
18
|
+
typeOptions: {
|
|
19
|
+
searchListMethod: 'searchTables',
|
|
20
|
+
searchable: true,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
displayName: 'Name',
|
|
25
|
+
name: 'name',
|
|
26
|
+
type: 'string',
|
|
27
|
+
placeholder: 'table_name',
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
};
|
|
31
|
+
exports.optionsCollection = {
|
|
32
|
+
displayName: 'Options',
|
|
33
|
+
name: 'options',
|
|
34
|
+
type: 'collection',
|
|
35
|
+
default: {},
|
|
36
|
+
placeholder: 'Add Option',
|
|
37
|
+
options: [
|
|
38
|
+
{
|
|
39
|
+
displayName: 'Connection Timeout',
|
|
40
|
+
name: 'connectionTimeoutMillis',
|
|
41
|
+
type: 'number',
|
|
42
|
+
default: 30,
|
|
43
|
+
description: 'Number of milliseconds reserved for connecting to the database',
|
|
44
|
+
typeOptions: {
|
|
45
|
+
minValue: 1,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
displayName: 'Connections Limit',
|
|
50
|
+
name: 'connectionLimit',
|
|
51
|
+
type: 'number',
|
|
52
|
+
default: 10,
|
|
53
|
+
typeOptions: {
|
|
54
|
+
minValue: 1,
|
|
55
|
+
},
|
|
56
|
+
description: 'Maximum amount of connections to the database, setting high value can lead to performance issues and potential database crashes',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
displayName: 'Query Batching',
|
|
60
|
+
name: 'queryBatching',
|
|
61
|
+
type: 'options',
|
|
62
|
+
noDataExpression: true,
|
|
63
|
+
description: 'The way queries should be sent to the database',
|
|
64
|
+
options: [
|
|
65
|
+
{
|
|
66
|
+
name: 'Single Query',
|
|
67
|
+
value: interfaces_1.BATCH_MODE.SINGLE,
|
|
68
|
+
description: 'A single query for all incoming items',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'Independently',
|
|
72
|
+
value: interfaces_1.BATCH_MODE.INDEPENDENTLY,
|
|
73
|
+
description: 'Execute one query per incoming item of the run',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: 'Transaction',
|
|
77
|
+
value: interfaces_1.BATCH_MODE.TRANSACTION,
|
|
78
|
+
description: 'Execute all queries in a transaction, if a failure occurs, all changes are rolled back',
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
default: interfaces_1.SINGLE,
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
displayName: 'Query Parameters',
|
|
85
|
+
name: 'queryReplacement',
|
|
86
|
+
type: 'string',
|
|
87
|
+
default: '',
|
|
88
|
+
placeholder: 'e.g. value1,value2,value3',
|
|
89
|
+
description: 'Comma-separated list of the values you want to use as query parameters. You can drag the values from the input panel on the left. <a href="https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.mysql/">More info</a>',
|
|
90
|
+
hint: 'Comma-separated list of values: reference them in your query as $1, $2, $3…',
|
|
91
|
+
displayOptions: {
|
|
92
|
+
show: { '/operation': ['executeQuery'] },
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
displayName: 'Output Columns',
|
|
97
|
+
name: 'outputColumns',
|
|
98
|
+
type: 'multiOptions',
|
|
99
|
+
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
100
|
+
typeOptions: {
|
|
101
|
+
loadOptionsMethod: 'getColumnsMultiOptions',
|
|
102
|
+
loadOptionsDependsOn: ['table.value'],
|
|
103
|
+
},
|
|
104
|
+
default: [],
|
|
105
|
+
displayOptions: {
|
|
106
|
+
show: { '/operation': ['select'] },
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
displayName: 'Output Large-Format Numbers As',
|
|
111
|
+
name: 'largeNumbersOutput',
|
|
112
|
+
type: 'options',
|
|
113
|
+
options: [
|
|
114
|
+
{
|
|
115
|
+
name: 'Numbers',
|
|
116
|
+
value: 'numbers',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: 'Text',
|
|
120
|
+
value: 'text',
|
|
121
|
+
description: 'Use this if you expect numbers longer than 16 digits (otherwise numbers may be incorrect)',
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
hint: 'Applies to NUMERIC and BIGINT columns only',
|
|
125
|
+
default: 'text',
|
|
126
|
+
displayOptions: {
|
|
127
|
+
show: { '/operation': ['select', 'executeQuery'] },
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
displayName: 'Priority',
|
|
132
|
+
name: 'priority',
|
|
133
|
+
type: 'options',
|
|
134
|
+
options: [
|
|
135
|
+
{
|
|
136
|
+
name: 'Low Prioirity',
|
|
137
|
+
value: 'LOW_PRIORITY',
|
|
138
|
+
description: 'Delays execution of the INSERT until no other clients are reading from the table',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: 'High Priority',
|
|
142
|
+
value: 'HIGH_PRIORITY',
|
|
143
|
+
description: 'Overrides the effect of the --low-priority-updates option if the server was started with that option. It also causes concurrent inserts not to be used.',
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
default: 'LOW_PRIORITY',
|
|
147
|
+
description: 'Ignore any ignorable errors that occur while executing the INSERT statement',
|
|
148
|
+
displayOptions: {
|
|
149
|
+
show: {
|
|
150
|
+
'/operation': ['insert'],
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
displayName: 'Replace Empty Strings with NULL',
|
|
156
|
+
name: 'replaceEmptyStrings',
|
|
157
|
+
type: 'boolean',
|
|
158
|
+
default: false,
|
|
159
|
+
description: 'Whether to replace empty strings with NULL in input, could be useful when data come from spreadsheet',
|
|
160
|
+
displayOptions: {
|
|
161
|
+
show: {
|
|
162
|
+
'/operation': ['insert', 'update', 'upsert', 'executeQuery'],
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
displayName: 'Select Distinct',
|
|
168
|
+
name: 'selectDistinct',
|
|
169
|
+
type: 'boolean',
|
|
170
|
+
default: false,
|
|
171
|
+
description: 'Whether to remove these duplicate rows',
|
|
172
|
+
displayOptions: {
|
|
173
|
+
show: {
|
|
174
|
+
'/operation': ['select'],
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
displayName: 'Output Query Execution Details',
|
|
180
|
+
name: 'detailedOutput',
|
|
181
|
+
type: 'boolean',
|
|
182
|
+
default: false,
|
|
183
|
+
description: 'Whether to show in output details of the ofexecuted query for each statement, or just confirmation of success',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
displayName: 'Skip on Conflict',
|
|
187
|
+
name: 'skipOnConflict',
|
|
188
|
+
type: 'boolean',
|
|
189
|
+
default: false,
|
|
190
|
+
description: 'Whether to skip the row and do not throw error if a unique constraint or exclusion constraint is violated',
|
|
191
|
+
displayOptions: {
|
|
192
|
+
show: {
|
|
193
|
+
'/operation': ['insert'],
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
],
|
|
198
|
+
};
|
|
199
|
+
exports.selectRowsFixedCollection = {
|
|
200
|
+
displayName: 'Select Rows',
|
|
201
|
+
name: 'where',
|
|
202
|
+
type: 'fixedCollection',
|
|
203
|
+
typeOptions: {
|
|
204
|
+
multipleValues: true,
|
|
205
|
+
},
|
|
206
|
+
placeholder: 'Add Condition',
|
|
207
|
+
default: {},
|
|
208
|
+
description: 'If not set, all rows will be selected',
|
|
209
|
+
options: [
|
|
210
|
+
{
|
|
211
|
+
displayName: 'Values',
|
|
212
|
+
name: 'values',
|
|
213
|
+
values: [
|
|
214
|
+
{
|
|
215
|
+
displayName: 'Column',
|
|
216
|
+
name: 'column',
|
|
217
|
+
type: 'options',
|
|
218
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
219
|
+
default: '',
|
|
220
|
+
placeholder: 'e.g. ID',
|
|
221
|
+
typeOptions: {
|
|
222
|
+
loadOptionsMethod: 'getColumns',
|
|
223
|
+
loadOptionsDependsOn: ['schema.value', 'table.value'],
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
displayName: 'Operator',
|
|
228
|
+
name: 'condition',
|
|
229
|
+
type: 'options',
|
|
230
|
+
description: "The operator to check the column against. When using 'LIKE' operator percent sign ( %) matches zero or more characters, underscore ( _ ) matches any single character.",
|
|
231
|
+
options: [
|
|
232
|
+
{
|
|
233
|
+
name: 'Equal',
|
|
234
|
+
value: 'equal',
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
name: 'Not Equal',
|
|
238
|
+
value: '!=',
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
name: 'Like',
|
|
242
|
+
value: 'LIKE',
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
name: 'Greater Than',
|
|
246
|
+
value: '>',
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
name: 'Less Than',
|
|
250
|
+
value: '<',
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
name: 'Greater Than Or Equal',
|
|
254
|
+
value: '>=',
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
name: 'Less Than Or Equal',
|
|
258
|
+
value: '<=',
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
name: 'Is Null',
|
|
262
|
+
value: 'IS NULL',
|
|
263
|
+
},
|
|
264
|
+
],
|
|
265
|
+
default: 'equal',
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
displayName: 'Value',
|
|
269
|
+
name: 'value',
|
|
270
|
+
type: 'string',
|
|
271
|
+
default: '',
|
|
272
|
+
},
|
|
273
|
+
],
|
|
274
|
+
},
|
|
275
|
+
],
|
|
276
|
+
};
|
|
277
|
+
exports.sortFixedCollection = {
|
|
278
|
+
displayName: 'Sort',
|
|
279
|
+
name: 'sort',
|
|
280
|
+
type: 'fixedCollection',
|
|
281
|
+
typeOptions: {
|
|
282
|
+
multipleValues: true,
|
|
283
|
+
},
|
|
284
|
+
placeholder: 'Add Sort Rule',
|
|
285
|
+
default: {},
|
|
286
|
+
options: [
|
|
287
|
+
{
|
|
288
|
+
displayName: 'Values',
|
|
289
|
+
name: 'values',
|
|
290
|
+
values: [
|
|
291
|
+
{
|
|
292
|
+
displayName: 'Column',
|
|
293
|
+
name: 'column',
|
|
294
|
+
type: 'options',
|
|
295
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
296
|
+
default: '',
|
|
297
|
+
typeOptions: {
|
|
298
|
+
loadOptionsMethod: 'getColumns',
|
|
299
|
+
loadOptionsDependsOn: ['schema.value', 'table.value'],
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
displayName: 'Direction',
|
|
304
|
+
name: 'direction',
|
|
305
|
+
type: 'options',
|
|
306
|
+
options: [
|
|
307
|
+
{
|
|
308
|
+
name: 'ASC',
|
|
309
|
+
value: 'ASC',
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
name: 'DESC',
|
|
313
|
+
value: 'DESC',
|
|
314
|
+
},
|
|
315
|
+
],
|
|
316
|
+
default: 'ASC',
|
|
317
|
+
},
|
|
318
|
+
],
|
|
319
|
+
},
|
|
320
|
+
],
|
|
321
|
+
};
|
|
322
|
+
exports.combineConditionsCollection = {
|
|
323
|
+
displayName: 'Combine Conditions',
|
|
324
|
+
name: 'combineConditions',
|
|
325
|
+
type: 'options',
|
|
326
|
+
description: 'How to combine the conditions defined in "Select Rows": AND requires all conditions to be true, OR requires at least one condition to be true',
|
|
327
|
+
options: [
|
|
328
|
+
{
|
|
329
|
+
name: 'AND',
|
|
330
|
+
value: 'AND',
|
|
331
|
+
description: 'Only rows that meet all the conditions are selected',
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
name: 'OR',
|
|
335
|
+
value: 'OR',
|
|
336
|
+
description: 'Rows that meet at least one condition are selected',
|
|
337
|
+
},
|
|
338
|
+
],
|
|
339
|
+
default: 'AND',
|
|
340
|
+
};
|
|
341
|
+
//# sourceMappingURL=common.descriptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.descriptions.js","sourceRoot":"","sources":["../../../../../nodes/MySql/v2/actions/common.descriptions.ts"],"names":[],"mappings":";;;AACA,sDAA2D;AAE9C,QAAA,QAAQ,GAAoB;IACxC,WAAW,EAAE,OAAO;IACpB,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,iBAAiB;IACvB,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE;IACpC,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,+BAA+B;IAC5C,KAAK,EAAE;QACN;YACC,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,MAAM;Y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
|
2
|
+
import * as deleteTable from './deleteTable.operation';
|
|
3
|
+
import * as executeQuery from './executeQuery.operation';
|
|
4
|
+
import * as insert from './insert.operation';
|
|
5
|
+
import * as select from './select.operation';
|
|
6
|
+
import * as update from './update.operation';
|
|
7
|
+
import * as upsert from './upsert.operation';
|
|
8
|
+
export { deleteTable, executeQuery, insert, select, update, upsert };
|
|
9
|
+
export declare const description: INodeProperties[];
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.description = exports.upsert = exports.update = exports.select = exports.insert = exports.executeQuery = exports.deleteTable = void 0;
|
|
27
|
+
const deleteTable = __importStar(require("./deleteTable.operation"));
|
|
28
|
+
exports.deleteTable = deleteTable;
|
|
29
|
+
const executeQuery = __importStar(require("./executeQuery.operation"));
|
|
30
|
+
exports.executeQuery = executeQuery;
|
|
31
|
+
const insert = __importStar(require("./insert.operation"));
|
|
32
|
+
exports.insert = insert;
|
|
33
|
+
const select = __importStar(require("./select.operation"));
|
|
34
|
+
exports.select = select;
|
|
35
|
+
const update = __importStar(require("./update.operation"));
|
|
36
|
+
exports.update = update;
|
|
37
|
+
const upsert = __importStar(require("./upsert.operation"));
|
|
38
|
+
exports.upsert = upsert;
|
|
39
|
+
const common_descriptions_1 = require("../common.descriptions");
|
|
40
|
+
exports.description = [
|
|
41
|
+
{
|
|
42
|
+
displayName: 'Operation',
|
|
43
|
+
name: 'operation',
|
|
44
|
+
type: 'options',
|
|
45
|
+
noDataExpression: true,
|
|
46
|
+
options: [
|
|
47
|
+
{
|
|
48
|
+
name: 'Delete',
|
|
49
|
+
value: 'deleteTable',
|
|
50
|
+
description: 'Delete an entire table or rows in a table',
|
|
51
|
+
action: 'Delete table or rows',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'Execute SQL',
|
|
55
|
+
value: 'executeQuery',
|
|
56
|
+
description: 'Execute an SQL query',
|
|
57
|
+
action: 'Execute a SQL query',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'Insert',
|
|
61
|
+
value: 'insert',
|
|
62
|
+
description: 'Insert rows in a table',
|
|
63
|
+
action: 'Insert rows in a table',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'Insert or Update',
|
|
67
|
+
value: 'upsert',
|
|
68
|
+
description: 'Insert or update rows in a table',
|
|
69
|
+
action: 'Insert or update rows in a table',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: 'Select',
|
|
73
|
+
value: 'select',
|
|
74
|
+
description: 'Select rows from a table',
|
|
75
|
+
action: 'Select rows from a table',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'Update',
|
|
79
|
+
value: 'update',
|
|
80
|
+
description: 'Update rows in a table',
|
|
81
|
+
action: 'Update rows in a table',
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
displayOptions: {
|
|
85
|
+
show: {
|
|
86
|
+
resource: ['database'],
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
default: 'insert',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
...common_descriptions_1.tableRLC,
|
|
93
|
+
displayOptions: { hide: { operation: ['executeQuery'] } },
|
|
94
|
+
},
|
|
95
|
+
...deleteTable.description,
|
|
96
|
+
...executeQuery.description,
|
|
97
|
+
...insert.description,
|
|
98
|
+
...select.description,
|
|
99
|
+
...update.description,
|
|
100
|
+
...upsert.description,
|
|
101
|
+
];
|
|
102
|
+
//# sourceMappingURL=Database.resource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Database.resource.js","sourceRoot":"","sources":["../../../../../../nodes/MySql/v2/actions/database/Database.resource.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,qEAAuD;AAQ9C,kCAAW;AAPpB,uEAAyD;AAOnC,oCAAY;AANlC,2DAA6C;AAMT,wBAAM;AAL1C,2DAA6C;AAKD,wBAAM;AAJlD,2DAA6C;AAIO,wBAAM;AAH1D,2DAA6C;AAGe,wBAAM;AAFlE,gEAAkD;AAIrC,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,aAAa;gBACpB,WAAW,EAAE,2CAA2C;gBACxD,MAAM,EAAE,sBAAsB;aAC9B;YACD;gBACC,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,cAAc;gBACrB,WAAW,EAAE,sBAAsB;gBACnC,MAAM,EAAE,qBAAqB;aAC7B;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,wBAAwB;gBACrC,MAAM,EAAE,wBAAwB;aAChC;YACD;gBAEC,IAAI,EAAE,kBAAkB;gBACxB,KAAK,EAAE,QAAQ;gBAEf,WAAW,EAAE,kCAAkC;gBAC/C,MAAM,EAAE,kCAAkC;aAC1C;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,0BAA0B;gBACvC,MAAM,EAAE,0BAA0B;aAClC;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,wBAAwB;gBACrC,MAAM,EAAE,wBAAwB;aAChC;SACD;QACD,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,UAAU,CAAC;aACtB;SACD;QACD,OAAO,EAAE,QAAQ;KACjB;IACD;QACC,GAAG,8BAAQ;QACX,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,cAAc,CAAC,EAAE,EAAE;KACzD;IACD,GAAG,WAAW,CAAC,WAAW;IAC1B,GAAG,YAAY,CAAC,WAAW;IAC3B,GAAG,MAAM,CAAC,WAAW;IACrB,GAAG,MAAM,CAAC,WAAW;IACrB,GAAG,MAAM,CAAC,WAAW;IACrB,GAAG,MAAM,CAAC,WAAW;CACrB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IExecuteFunctions } from 'n8n-core';
|
|
2
|
+
import type { INodeExecutionData, INodeProperties } from 'n8n-workflow';
|
|
3
|
+
import type { QueryRunner } from '../../helpers/interfaces';
|
|
4
|
+
export declare const description: {
|
|
5
|
+
displayOptions: import("n8n-workflow").IDisplayOptions;
|
|
6
|
+
displayName: string;
|
|
7
|
+
name: string;
|
|
8
|
+
type: import("n8n-workflow").NodePropertyTypes;
|
|
9
|
+
typeOptions?: import("n8n-workflow").INodePropertyTypeOptions | undefined;
|
|
10
|
+
default: import("n8n-workflow").NodeParameterValueType;
|
|
11
|
+
description?: string | undefined;
|
|
12
|
+
hint?: string | undefined;
|
|
13
|
+
options?: (INodeProperties | import("n8n-workflow").INodePropertyOptions | import("n8n-workflow").INodePropertyCollection)[] | undefined;
|
|
14
|
+
placeholder?: string | undefined;
|
|
15
|
+
isNodeSetting?: boolean | undefined;
|
|
16
|
+
noDataExpression?: boolean | undefined;
|
|
17
|
+
required?: boolean | undefined;
|
|
18
|
+
routing?: import("n8n-workflow").INodePropertyRouting | undefined;
|
|
19
|
+
credentialTypes?: ("extends:oAuth2Api" | "extends:oAuth1Api" | "has:authenticate" | "has:genericAuth")[] | undefined;
|
|
20
|
+
extractValue?: import("n8n-workflow").INodePropertyValueExtractorRegex | undefined;
|
|
21
|
+
modes?: import("n8n-workflow").INodePropertyMode[] | undefined;
|
|
22
|
+
requiresDataPath?: "single" | "multiple" | undefined;
|
|
23
|
+
}[];
|
|
24
|
+
export declare function execute(this: IExecuteFunctions, inputItems: INodeExecutionData[], runQueries: QueryRunner): Promise<INodeExecutionData[]>;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.execute = exports.description = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const utilities_1 = require("../../../../../utils/utilities");
|
|
6
|
+
const utils_1 = require("../../helpers/utils");
|
|
7
|
+
const common_descriptions_1 = require("../common.descriptions");
|
|
8
|
+
const properties = [
|
|
9
|
+
{
|
|
10
|
+
displayName: 'Command',
|
|
11
|
+
name: 'deleteCommand',
|
|
12
|
+
type: 'options',
|
|
13
|
+
default: 'truncate',
|
|
14
|
+
options: [
|
|
15
|
+
{
|
|
16
|
+
name: 'Truncate',
|
|
17
|
+
value: 'truncate',
|
|
18
|
+
description: "Only removes the table's data and preserves the table's structure",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'Delete',
|
|
22
|
+
value: 'delete',
|
|
23
|
+
description: "Delete the rows that match the 'Select Rows' conditions below. If no selection is made, all rows in the table are deleted.",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'Drop',
|
|
27
|
+
value: 'drop',
|
|
28
|
+
description: "Deletes the table's data and also the table's structure permanently",
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
...common_descriptions_1.selectRowsFixedCollection,
|
|
34
|
+
displayOptions: {
|
|
35
|
+
show: {
|
|
36
|
+
deleteCommand: ['delete'],
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
...common_descriptions_1.combineConditionsCollection,
|
|
42
|
+
displayOptions: {
|
|
43
|
+
show: {
|
|
44
|
+
deleteCommand: ['delete'],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
common_descriptions_1.optionsCollection,
|
|
49
|
+
];
|
|
50
|
+
const displayOptions = {
|
|
51
|
+
show: {
|
|
52
|
+
resource: ['database'],
|
|
53
|
+
operation: ['deleteTable'],
|
|
54
|
+
},
|
|
55
|
+
hide: {
|
|
56
|
+
table: [''],
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
exports.description = (0, utilities_1.updateDisplayOptions)(displayOptions, properties);
|
|
60
|
+
async function execute(inputItems, runQueries) {
|
|
61
|
+
let returnData = [];
|
|
62
|
+
const queries = [];
|
|
63
|
+
for (let i = 0; i < inputItems.length; i++) {
|
|
64
|
+
const table = this.getNodeParameter('table', i, undefined, {
|
|
65
|
+
extractValue: true,
|
|
66
|
+
});
|
|
67
|
+
const deleteCommand = this.getNodeParameter('deleteCommand', i);
|
|
68
|
+
let query = '';
|
|
69
|
+
let values = [];
|
|
70
|
+
if (deleteCommand === 'drop') {
|
|
71
|
+
query = `DROP TABLE IF EXISTS \`${table}\``;
|
|
72
|
+
}
|
|
73
|
+
if (deleteCommand === 'truncate') {
|
|
74
|
+
query = `TRUNCATE TABLE \`${table}\``;
|
|
75
|
+
}
|
|
76
|
+
if (deleteCommand === 'delete') {
|
|
77
|
+
const whereClauses = this.getNodeParameter('where', i, []).values || [];
|
|
78
|
+
const combineConditions = this.getNodeParameter('combineConditions', i, 'AND');
|
|
79
|
+
[query, values] = (0, utils_1.addWhereClauses)(this.getNode(), i, `DELETE FROM \`${table}\``, whereClauses, values, combineConditions);
|
|
80
|
+
}
|
|
81
|
+
if (query === '') {
|
|
82
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Invalid delete command, only drop, delete and truncate are supported ', { itemIndex: i });
|
|
83
|
+
}
|
|
84
|
+
const queryWithValues = { query, values };
|
|
85
|
+
queries.push(queryWithValues);
|
|
86
|
+
}
|
|
87
|
+
returnData = await runQueries(queries);
|
|
88
|
+
return returnData;
|
|
89
|
+
}
|
|
90
|
+
exports.execute = execute;
|
|
91
|
+
//# sourceMappingURL=deleteTable.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteTable.operation.js","sourceRoot":"","sources":["../../../../../../nodes/MySql/v2/actions/database/deleteTable.operation.ts"],"names":[],"mappings":";;;AAEA,+CAAkD;AASlD,8DAAsE;AAEtE,+CAAsD;AAEtD,gEAIgC;AAEhC,MAAM,UAAU,GAAsB;IACrC;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,UAAU;QACnB,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,mEAAmE;aAChF;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EACV,4HAA4H;aAC7H;YACD;gBACC,IAAI,EAAE,MAAM;gBACZ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BAAoB,KAAK,IAAI,CAAC;SACtC;QAED,IAAI,aAAa,KAAK,QAAQ,EAAE;YAC/B,MAAM,YAAY,GACf,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,CAAiB,CAAC,MAAwB,IAAI,EAAE,CAAC;YAExF,MAAM,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,EAAE,CAAC,EAAE,KAAK,CAAW,CAAC;YAEzF,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,IAAA,uBAAe,EAChC,IAAI,CAAC,OAAO,EAAE,EACd,CAAC,EACD,iBAAiB,KAAK,IAAI,EAC1B,YAAY,EACZ,MAAM,EACN,iBAAiB,CACjB,CAAC;SACF;QAED,IAAI,KAAK,KAAK,EAAE,EAAE;YACjB,MAAM,IAAI,iCAAkB,CAC3B,IAAI,CAAC,OAAO,EAAE,EACd,uEAAuE,EACvE,EAAE,SAAS,EAAE,CAAC,EAAE,CAChB,CAAC;SACF;QAED,MAAM,eAAe,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QAE1C,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;KAC9B;IAED,UAAU,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,CAAC;IAEvC,OAAO,UAAU,CAAC;AACnB,CAAC;AA3DD,0BA2DC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IExecuteFunctions } from 'n8n-core';
|
|
2
|
+
import type { IDataObject, INodeExecutionData, INodeProperties } from 'n8n-workflow';
|
|
3
|
+
import type { QueryRunner } from '../../helpers/interfaces';
|
|
4
|
+
export declare const description: {
|
|
5
|
+
displayOptions: import("n8n-workflow").IDisplayOptions;
|
|
6
|
+
displayName: string;
|
|
7
|
+
name: string;
|
|
8
|
+
type: import("n8n-workflow").NodePropertyTypes;
|
|
9
|
+
typeOptions?: import("n8n-workflow").INodePropertyTypeOptions | undefined;
|
|
10
|
+
default: import("n8n-workflow").NodeParameterValueType;
|
|
11
|
+
description?: string | undefined;
|
|
12
|
+
hint?: string | undefined;
|
|
13
|
+
options?: (INodeProperties | import("n8n-workflow").INodePropertyOptions | import("n8n-workflow").INodePropertyCollection)[] | undefined;
|
|
14
|
+
placeholder?: string | undefined;
|
|
15
|
+
isNodeSetting?: boolean | undefined;
|
|
16
|
+
noDataExpression?: boolean | undefined;
|
|
17
|
+
required?: boolean | undefined;
|
|
18
|
+
routing?: import("n8n-workflow").INodePropertyRouting | undefined;
|
|
19
|
+
credentialTypes?: ("extends:oAuth2Api" | "extends:oAuth1Api" | "has:authenticate" | "has:genericAuth")[] | undefined;
|
|
20
|
+
extractValue?: import("n8n-workflow").INodePropertyValueExtractorRegex | undefined;
|
|
21
|
+
modes?: import("n8n-workflow").INodePropertyMode[] | undefined;
|
|
22
|
+
requiresDataPath?: "single" | "multiple" | undefined;
|
|
23
|
+
}[];
|
|
24
|
+
export declare function execute(this: IExecuteFunctions, inputItems: INodeExecutionData[], runQueries: QueryRunner, nodeOptions: IDataObject): Promise<INodeExecutionData[]>;
|