mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
feat(Data Table Node): Add bulk insert mode (no-changelog) (#19294)
This commit is contained in:
@@ -88,6 +88,16 @@ export type DataStoreRows = DataStoreRow[];
|
||||
export type DataStoreRowReturn = DataStoreRow & DataStoreRowReturnBase;
|
||||
export type DataStoreRowsReturn = DataStoreRowReturn[];
|
||||
|
||||
export type DataTableInsertRowsReturnType = 'all' | 'id' | 'count';
|
||||
export type DataTableInsertRowsBulkResult = { success: true; insertedRows: number };
|
||||
export type DataTableInsertRowsResult<
|
||||
T extends DataTableInsertRowsReturnType = DataTableInsertRowsReturnType,
|
||||
> = T extends 'all'
|
||||
? DataStoreRowReturn[]
|
||||
: T extends 'id'
|
||||
? Array<Pick<DataStoreRowReturn, 'id'>>
|
||||
: DataTableInsertRowsBulkResult;
|
||||
|
||||
// APIs for a data store service operating on a specific projectId
|
||||
export interface IDataStoreProjectAggregateService {
|
||||
getProjectId(): string;
|
||||
@@ -116,7 +126,10 @@ export interface IDataStoreProjectService {
|
||||
dto: Partial<ListDataStoreRowsOptions>,
|
||||
): Promise<{ count: number; data: DataStoreRowsReturn }>;
|
||||
|
||||
insertRows(rows: DataStoreRows): Promise<DataStoreRowReturn[]>;
|
||||
insertRows<T extends DataTableInsertRowsReturnType>(
|
||||
rows: DataStoreRows,
|
||||
returnType: T,
|
||||
): Promise<DataTableInsertRowsResult<T>>;
|
||||
|
||||
updateRow(options: UpdateDataStoreRowOptions): Promise<DataStoreRowReturn[]>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user