mattiskristensen
DTDrizzle Team
•Created by mattiskristensen on 11/26/2024 in #help
Passing transaction to functions
Hey everyone. Quite new to the drizzle sphere. Coming from Go, i am quite used to passing db transactions from function to function, to be able to orchestrate a bigger function from smaller ones.
As an example, say i have some music track. each track can have multiple genres, and each genre could be associated with different tracks - a many-to-many relationship.
Essentially, i would love to be able to create this chain of functions:
This, to make me able to use the
getTrackGenres
function independently for other types of queries, aswell as make code more readable. Is this possible somehow with TypeScript?
Thanks in advance!6 replies