How can I perform batch updates unique entities in Prisma?
How can I perform batch updates in Prisma — akin to createMany — by passing an array or collection to a single operation? I’m working inside long-lived interactive transactions and need to update multiple records by their unique IDs. What’s the best approach?
1. Using
2. Writing a custom extension or helper with an SQL builder
3. Executing raw SQL via
Could you also show an example SQL query that accomplishes this? (I’m not very familiar with SQL, so any guidance is appreciated.)
1. Using
Promise.all([ tx.model.update(…)*N ]) for each item2. Writing a custom extension or helper with an SQL builder
3. Executing raw SQL via
tx.$executeRawCould you also show an example SQL query that accomplishes this? (I’m not very familiar with SQL, so any guidance is appreciated.)