Is there support for transactions? #334
-
Hey there! I look the documentation but I didn't find any related. Maybe is there a helper utility I can import from the Prisma client? I would to add bulk inserts to the database. All elements should be inserted OR all fail. A common use case for transactions. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Sounds like query batching or create_many would be the solution for you. The limitation with query batching is that the records are sent all at once which means you can't create one record then create another record that relies on the first one for example. In this case you would need interactive transactions which are not supported yet but are being worked on #53. |
Beta Was this translation helpful? Give feedback.
Sounds like query batching or create_many would be the solution for you.
The limitation with query batching is that the records are sent all at once which means you can't create one record then create another record that relies on the first one for example. In this case you would need interactive transactions which are not supported yet but are being worked on #53.