P
Prisma2w ago
Arxk

Converting a query to use TypedSQL

prisma.$transaction(data.map((match) => {
return prisma.match.update({
where: {
matchId: match.id,
},
data: {
fixtureData: match as unknown as InputJsonValue,
dateOfDay: match.date,
}
});
})
prisma.$transaction(data.map((match) => {
return prisma.match.update({
where: {
matchId: match.id,
},
data: {
fixtureData: match as unknown as InputJsonValue,
dateOfDay: match.date,
}
});
})
How would I be able to convert this to a TypedSQL query?
2 Replies
Prisma AI Help
You decided to hold for human wisdom. We'll chime in soon! Meanwhile, #ask-ai is there if you need a quick second opinion.
Nurul
Nurul2w ago
I assume you want to convert the update query to a TypedSQL query I would recommend you to enable logging to get the generated SQL query for this prisma query which you can then use to create a TypedSQL.
Logging | Prisma Documentation
Learn how to configure Prisma Client to log the raw SQL queries it sends to the database and other information.

Did you find this page helpful?