Files
Automata/packages/cli/src/databases/repositories/executionData.repository.ts
कारतोफ्फेलस्क्रिप्ट™ 8e392cfc1d feat(core): Migrate to n8n's typeorm fork (#8590)
2024-02-08 15:13:29 +01:00

20 lines
575 B
TypeScript

import { Service } from 'typedi';
import { DataSource, In, Repository } from '@n8n/typeorm';
import { ExecutionData } from '../entities/ExecutionData';
@Service()
export class ExecutionDataRepository extends Repository<ExecutionData> {
constructor(dataSource: DataSource) {
super(ExecutionData, dataSource.manager);
}
async findByExecutionIds(executionIds: string[]) {
return await this.find({
select: ['workflowData'],
where: {
executionId: In(executionIds),
},
}).then((executionData) => executionData.map(({ workflowData }) => workflowData));
}
}