Hi – is it possible to use RAISE EXCEPTION in exec...
# orm-help
j
Hi – is it possible to use RAISE EXCEPTION in executeRawUnsafe? I am receiving a syntax error when using it, but it's the only way that I can think to make Prisma's transaction functionality work for our use case. We need to look up rows, perform service logic on those rows, and subsequently create or update multiple tables. We need the create/updates to be executed as a transaction, and we also need to use optimistic concurrency control to guard against race conditions between the find+create. The best way I can think to do this is to add raw SQL to the transaction that throws if the expected version has been incremented. Is this possible with Prisma's executeRawUnsafe API?
As an explanation, we can't use interactive transactions because of the concurrent execution timeout bug
r
@James Schull 👋 I don’t think that’s possible. It would be great if you could create a feature request so that we can look into this 🙂