A more modular way to combine predefined query into a single transaction
Hello currently I write my query into something like this
This function sometimes called separately, but there are times that I wanted to combine those query into a single transaction.
What I do right now is creating a whole new transaction query without reusing the query above something like
as you can see it's seems inefficient, since the query is the same with those 3 defined function, is there any way i can utilize it and use it into transaction ?
i suspect that i can use a QueryBuilder or something
a suggestion would be very much appreciated
2 Replies
https://drizzle.run/lt295lgldz4avpzwdee7ddhd
You will need some inversion of control here
Drizzle Run
Transaction or DB - Drizzle Run
Thankyou very much, it's very helpfull for me. it's really helping me a lot