MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / changeUpdateOnDataset

Function changeUpdateOnDataset

packages/server/src/services/dataset/index.ts:304–318  ·  view source on GitHub ↗
(id: string, workspaceId: string, entityManager?: any)

Source from the content-addressed store, hash-verified

302}
303
304const changeUpdateOnDataset = async (id: string, workspaceId: string, entityManager?: any) => {
305 const appServer = getRunningExpressApp()
306 const dataset = await appServer.AppDataSource.getRepository(Dataset).findOneBy({
307 id: id,
308 workspaceId: workspaceId
309 })
310 if (!dataset) throw new InternalFlowiseError(StatusCodes.NOT_FOUND, `Dataset ${id} not found`)
311
312 dataset.updatedDate = new Date()
313 if (entityManager) {
314 await entityManager.getRepository(Dataset).save(dataset)
315 } else {
316 await appServer.AppDataSource.getRepository(Dataset).save(dataset)
317 }
318}
319
320// Update row for a dataset
321const updateDatasetRow = async (id: string, body: any) => {

Callers 5

reorderDatasetRowFunction · 0.85
addDatasetRowFunction · 0.85
updateDatasetRowFunction · 0.85
deleteDatasetRowFunction · 0.85
patchDeleteRowsFunction · 0.85

Calls 1

getRunningExpressAppFunction · 0.90

Tested by

no test coverage detected