@rudsys/n8n-nodes-sqlite3 0.1.9 → 0.1.11
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.
|
@@ -240,26 +240,34 @@ class SqliteSsh {
|
|
|
240
240
|
displayName: 'Table',
|
|
241
241
|
name: 'table',
|
|
242
242
|
type: 'string',
|
|
243
|
+
displayOptions: { show: { operation: ['insert', 'select', 'update', 'delete'] } },
|
|
244
|
+
default: '',
|
|
245
|
+
required: true,
|
|
246
|
+
description: 'Name of the table',
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
displayName: 'Table',
|
|
250
|
+
name: 'manageTableTable',
|
|
251
|
+
type: 'string',
|
|
243
252
|
displayOptions: {
|
|
244
253
|
show: {
|
|
245
|
-
operation: [
|
|
246
|
-
'insert',
|
|
247
|
-
'select',
|
|
248
|
-
'update',
|
|
249
|
-
'delete',
|
|
250
|
-
'manageTables',
|
|
251
|
-
'manageColumns',
|
|
252
|
-
],
|
|
253
|
-
},
|
|
254
|
-
hide: {
|
|
255
254
|
operation: ['manageTables'],
|
|
256
|
-
tableAction: ['
|
|
255
|
+
tableAction: ['create', 'rename', 'drop'],
|
|
257
256
|
},
|
|
258
257
|
},
|
|
259
258
|
default: '',
|
|
260
259
|
required: true,
|
|
261
260
|
description: 'Name of the table',
|
|
262
261
|
},
|
|
262
|
+
{
|
|
263
|
+
displayName: 'Table',
|
|
264
|
+
name: 'manageColumnTable',
|
|
265
|
+
type: 'string',
|
|
266
|
+
displayOptions: { show: { operation: ['manageColumns'] } },
|
|
267
|
+
default: '',
|
|
268
|
+
required: true,
|
|
269
|
+
description: 'Name of the table',
|
|
270
|
+
},
|
|
263
271
|
// ------------------ Insert Options ------------------
|
|
264
272
|
{
|
|
265
273
|
displayName: 'Conflict Mode',
|
|
@@ -435,7 +443,20 @@ class SqliteSsh {
|
|
|
435
443
|
// ITERATIVE OPERATIONS (Select, Update, Delete, Raw Query)
|
|
436
444
|
for (let i = 0; i < items.length; i++) {
|
|
437
445
|
let sql = '';
|
|
438
|
-
|
|
446
|
+
let tableParam = '';
|
|
447
|
+
if (['insert', 'select', 'update', 'delete'].includes(operation)) {
|
|
448
|
+
tableParam = this.getNodeParameter('table', i);
|
|
449
|
+
}
|
|
450
|
+
else if (operation === 'manageTables') {
|
|
451
|
+
const tableActionVal = this.getNodeParameter('tableAction', i);
|
|
452
|
+
if (tableActionVal !== 'list') {
|
|
453
|
+
tableParam = this.getNodeParameter('manageTableTable', i);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
else if (operation === 'manageColumns') {
|
|
457
|
+
tableParam = this.getNodeParameter('manageColumnTable', i);
|
|
458
|
+
}
|
|
459
|
+
const table = tableParam ? escapeIdentifier(tableParam) : '';
|
|
439
460
|
if (operation === 'select') {
|
|
440
461
|
const columns = this.getNodeParameter('columns', i, '*');
|
|
441
462
|
const where = buildWhereClause(i);
|