Can someone point me toward docs for what to expec...
# orm-help
m
Can someone point me toward docs for what to expect from the return of a $transaction? I tried to drill down, but got stuck on
type UnwrapTuple<Tuple extends readonly unknown[]>
I'm happy to debug it for the answer, but I would prefer to have it in front of my eyes before I try to run it.
โœ… 1
n
Hey Michael ๐Ÿ‘‹ $transaction function should return a promise that will resolve with a tuple that contains the results of each query passed in the argument tuple.
m
Perfect, @Nurul - thanks. That's what I was hoping for. I've got to say, I've read over that documentation and I don't see where the return is specified in there. If I'm missing it, my apologies - but I thought I would bring it to your attention in case you were expecting that information to be in the link you provided.
n
It isnโ€™t clearly mentioned in the docs, Iโ€™ll create a docs issue for this so that we could fix this ๐Ÿ‘
๐Ÿ™‡ 1
c
Note there is a new I believe still experimental transaction API that's a lot more flexible, you can write procedural code, await things, etc. inside your transactions.
m
@Chris Tsongas - okay - I'm going to check it out. Sounds cool. Sounds like essentially an "unmanaged transaction" to use Sequelize terms - but they handle it by allowing the user to manually commit & rollback. As with everything else I've encountered so far with Prisma, I'm sure I'll like this better. ๐Ÿ™‚