mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Move copyInputItems to node helpers (no-changelog) (#7299)
This commit is contained in:
committed by
GitHub
parent
34bda535e6
commit
597669aa62
@@ -15,7 +15,7 @@ import { NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import type mysql2 from 'mysql2/promise';
|
||||
|
||||
import { copyInputItems, createConnection, searchTables } from './GenericFunctions';
|
||||
import { createConnection, searchTables } from './GenericFunctions';
|
||||
|
||||
import { oldVersionNotice } from '@utils/descriptions';
|
||||
|
||||
@@ -344,7 +344,7 @@ export class MySqlV1 implements INodeType {
|
||||
const table = this.getNodeParameter('table', 0, '', { extractValue: true }) as string;
|
||||
const columnString = this.getNodeParameter('columns', 0) as string;
|
||||
const columns = columnString.split(',').map((column) => column.trim());
|
||||
const insertItems = copyInputItems(items, columns);
|
||||
const insertItems = this.helpers.copyInputItems(items, columns);
|
||||
const insertPlaceholder = `(${columns.map((_column) => '?').join(',')})`;
|
||||
const options = this.getNodeParameter('options', 0);
|
||||
const insertIgnore = options.ignore as boolean;
|
||||
@@ -387,7 +387,7 @@ export class MySqlV1 implements INodeType {
|
||||
columns.unshift(updateKey);
|
||||
}
|
||||
|
||||
const updateItems = copyInputItems(items, columns);
|
||||
const updateItems = this.helpers.copyInputItems(items, columns);
|
||||
const updateSQL = `UPDATE ${table} SET ${columns
|
||||
.map((column) => `${column} = ?`)
|
||||
.join(',')} WHERE ${updateKey} = ?;`;
|
||||
|
||||
Reference in New Issue
Block a user