You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our current project we're on the way to use this lib to resolve some issues which we're facing with TypeORM core transaction. But we found that this lib just supported class method decorator. I implemented two helpers that can help to run transaction in the middle of the method/function body or wrap the a function that will run in transaction
functionmyService(){// do something here, e.g. call external service to get data
....TransactionRunner.run(()=>{
....})}
Or wrap a function:
functionmyService(){// do something
.....}exportdefaultwrapInTransaction(myService);
But the problem is that I couldn't found a way to pass Propagation and Isolation option to these functions. Is there any suggestion or it's reasonable to create a new PR that will extract the logic from Transactional.ts?
The text was updated successfully, but these errors were encountered:
Firstly, thank for your awesome lib @odavid !
In our current project we're on the way to use this lib to resolve some issues which we're facing with TypeORM core transaction. But we found that this lib just supported class method decorator. I implemented two helpers that can help to run transaction in the middle of the method/function body or wrap the a function that will run in transaction
Then we can use it like this:
Or wrap a function:
But the problem is that I couldn't found a way to pass Propagation and Isolation option to these functions. Is there any suggestion or it's reasonable to create a new PR that will extract the logic from Transactional.ts?
The text was updated successfully, but these errors were encountered: