fix(Data Table Node): Add bulk insert option (no-changelog) (#19176)

This commit is contained in:
Charlie Kolb
2025-09-04 16:18:50 +02:00
committed by GitHub
parent 0b24fb55e8
commit 12aa77746e
2 changed files with 62 additions and 21 deletions

View File

@@ -1,4 +1,5 @@
import type {
IDataStoreProjectService,
IDisplayOptions,
IExecuteFunctions,
INodeExecutionData,
@@ -30,3 +31,13 @@ export async function execute(
const insertedRows = await dataStoreProxy.insertRows([row]);
return insertedRows.map((json) => ({ json }));
}
export async function executeBulk(
this: IExecuteFunctions,
proxy: IDataStoreProjectService,
): Promise<INodeExecutionData[]> {
const rows = this.getInputData().flatMap((_, i) => [getAddRow(this, i)]);
const insertedRows = await proxy.insertRows(rows);
return insertedRows.map((json, item) => ({ json, pairedItem: { item } }));
}