mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix: Add paired item to the most used nodes (#5220)
* PairedItem for N8n training * Add paired item to ftp node * Add paired item to rocketChat * Add pairedItem to pushOver * Add paired item to Matrix * Add pairedItem to theHive * Add paired item to Snowflake * Add paired item to PhilipsHue * Add pairedItem to supabase * Add paired item to Odoo * fix odoo & add paired item to grist * add pairedItem to Linkedin * add pairedItem Zulip * add pairedItem PhatomBuster * add pairedItem to TodoistV2 * Add pairedItem HomeAssistant * Add pairedItem to DropContact * Add pairedItem to Aws SES * Add pairedItem to microsoftOutlook * Add pairedItem to AwsS3 * Add pairedItem to Aws DynamoDB * 🐛 fix Dropcontact enrich operation paired item support * 🐛 fix Dropcontact insert/update operation paired items * 🐛 fix Supabase paired item support * 🐛 fix Supabase paired item support * 🐛 fix N8nTrainingCustomerDatastore paired item support * 🎨 remove unused imports * 🐛 fix MicrosoftOutlook paired item support * 🐛 fix AwsS3 paired item support --------- Co-authored-by: Marcus <marcus@n8n.io>
This commit is contained in:
@@ -160,7 +160,7 @@ export class Snowflake implements INodeType {
|
||||
const credentials = (await this.getCredentials(
|
||||
'snowflake',
|
||||
)) as unknown as snowflake.ConnectionOptions;
|
||||
const returnData: IDataObject[] = [];
|
||||
const returnData: INodeExecutionData[] = [];
|
||||
let responseData;
|
||||
|
||||
const connection = snowflake.createConnection(credentials);
|
||||
@@ -178,7 +178,11 @@ export class Snowflake implements INodeType {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
const query = this.getNodeParameter('query', i) as string;
|
||||
responseData = await execute(connection, query, []);
|
||||
returnData.push.apply(returnData, responseData as IDataObject[]);
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData as IDataObject[]),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,7 +200,13 @@ export class Snowflake implements INodeType {
|
||||
const data = copyInputItems(items, columns);
|
||||
const binds = data.map((element) => Object.values(element));
|
||||
await execute(connection, query, binds as unknown as snowflake.InsertBinds);
|
||||
returnData.push.apply(returnData, data);
|
||||
data.forEach((d, i) => {
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(d),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
});
|
||||
}
|
||||
|
||||
if (operation === 'update') {
|
||||
@@ -221,11 +231,16 @@ export class Snowflake implements INodeType {
|
||||
for (let i = 0; i < binds.length; i++) {
|
||||
await execute(connection, query, binds[i] as unknown as snowflake.InsertBinds);
|
||||
}
|
||||
returnData.push.apply(returnData, data);
|
||||
data.forEach((d, i) => {
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(d),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
});
|
||||
}
|
||||
|
||||
await destroy(connection);
|
||||
|
||||
return [this.helpers.returnJsonArray(returnData)];
|
||||
return this.prepareOutputData(returnData);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user