Tips for composing helpers in transactions
How are people managing composing reusable db queries that can be used standalone (db.(...)) and as part of a transaction??
Example (pseudocode)
3 Replies
You can change the functions (or maybe in real code, class methods) to accept an optional tx object and use that instead
Was thinking something like this but would like to see if anybody has some nice tricks
something like that yeah