How to share the transaction in multiple services?
Hi,
This is more like a design question.
I'm using Drizzle ORM in Express.js application. I have
and then with the database transaction,
Note that in the above, I have to pass the
This is more like a design question.
I'm using Drizzle ORM in Express.js application. I have
userService and auditService to update the database records. Before the database transaction, I basically call the services like this,and then with the database transaction,
Note that in the above, I have to pass the
tx transaction to every service function. Is there a more elegant way than passing the tx to every function?