@rudsys/n8n-nodes-sqlite3 0.1.12 → 0.1.13
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.
|
@@ -288,6 +288,7 @@ class SqliteSsh {
|
|
|
288
288
|
options: [
|
|
289
289
|
{ name: 'Auto-Map Input Data to Columns', value: 'autoMap', description: 'Use all input items fields as column names' },
|
|
290
290
|
{ name: 'Map Specific Columns', value: 'define', description: 'Only use specific fields from input items' },
|
|
291
|
+
{ name: 'Manual Mapping', value: 'manual', description: 'Define columns and values manually' },
|
|
291
292
|
],
|
|
292
293
|
displayOptions: { show: { operation: ['insert', 'update'] } },
|
|
293
294
|
default: 'autoMap',
|
|
@@ -307,6 +308,42 @@ class SqliteSsh {
|
|
|
307
308
|
placeholder: 'id, name, email',
|
|
308
309
|
description: 'Comma-separated list of column names to map from input',
|
|
309
310
|
},
|
|
311
|
+
{
|
|
312
|
+
displayName: 'Values to Update',
|
|
313
|
+
name: 'manualFields',
|
|
314
|
+
type: 'fixedCollection',
|
|
315
|
+
typeOptions: { multipleValues: true },
|
|
316
|
+
displayOptions: {
|
|
317
|
+
show: {
|
|
318
|
+
operation: ['update'],
|
|
319
|
+
dataMode: ['manual'],
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
default: {},
|
|
323
|
+
placeholder: 'Add Field',
|
|
324
|
+
options: [
|
|
325
|
+
{
|
|
326
|
+
name: 'field',
|
|
327
|
+
displayName: 'Field',
|
|
328
|
+
values: [
|
|
329
|
+
{
|
|
330
|
+
displayName: 'Column',
|
|
331
|
+
name: 'column',
|
|
332
|
+
type: 'string',
|
|
333
|
+
default: '',
|
|
334
|
+
description: 'Name of the column to update',
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
displayName: 'Value',
|
|
338
|
+
name: 'value',
|
|
339
|
+
type: 'string',
|
|
340
|
+
default: '',
|
|
341
|
+
description: 'Value to set',
|
|
342
|
+
},
|
|
343
|
+
],
|
|
344
|
+
},
|
|
345
|
+
],
|
|
346
|
+
},
|
|
310
347
|
// ------------------ Select Options ------------------
|
|
311
348
|
{
|
|
312
349
|
displayName: 'Columns',
|
|
@@ -475,6 +512,11 @@ class SqliteSsh {
|
|
|
475
512
|
updateEntries = updateEntries.filter(([k]) => specificColumns.includes(k));
|
|
476
513
|
}
|
|
477
514
|
}
|
|
515
|
+
else if (dataMode === 'manual') {
|
|
516
|
+
const manualFields = this.getNodeParameter('manualFields', i);
|
|
517
|
+
const fields = (manualFields === null || manualFields === void 0 ? void 0 : manualFields.field) || [];
|
|
518
|
+
updateEntries = fields.map((f) => [f.column, f.value]);
|
|
519
|
+
}
|
|
478
520
|
const updateFields = updateEntries
|
|
479
521
|
.map(([k, v]) => `${escapeIdentifier(k)} = ${escapeValue(v)}`)
|
|
480
522
|
.join(', ');
|