This repository was archived by the owner on Apr 15, 2025. It is now read-only.
Is there support for transactions? #334
Answered
by
RobertCraigie
felinto-dev
asked this question in
Q&A
|
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. |
Answered by
RobertCraigie
Mar 12, 2022
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. |
1 reply
Answer selected by
felinto-dev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.