2
0

Replace updates with updateManys when possible

Easy performance win to avoid triggering SELECT query after an UPDATE
This commit is contained in:
Baptiste Arnaud
2023-07-16 18:52:30 +02:00
parent 12ce4eb01b
commit 3426d6689d
13 changed files with 21 additions and 28 deletions

View File

@@ -44,7 +44,7 @@ const updateResultVariables =
].filter((variable) => isDefined(variable.value)) as VariableWithValue[]
if (result.id)
await prisma.result.update({
await prisma.result.updateMany({
where: {
id: result.id,
},