I'd like to try implementing SAVEPOINT transaction...
# orm-help
m
I'd like to try implementing SAVEPOINT transactions for running integration tests in isolated transactions (see https://github.com/prisma/prisma/issues/9710) What I don't know how to do is replace all sql calls to
BEGIN
with
SAVEPOINT
(like pytest-sqlalchemy does) - is this possible to do while running my test? (edited)
j
You can not influence the SQL generated under the hood.
Best way to tackle this would with a feature request for
SAVEPOINT
with explanation why and when one would want to use this, maybe an idea how this could be configured etc.
m
I think the details of why and how it would be used are in that ticket https://github.com/prisma/prisma/issues/9710
j
Then that is the feature request 😄
What might be useful could be a speculative API for how Prisma Client could implement this.
m