Prepared statements with TRPC

Hi, I just read that to use prepare statements properly with a serverless environment I need to put my statements outside the scope of the handler. However I use TRPC with NextJS so all my queries are in the router of TRPC which end up in the handle, my question is:
Where should I put my prepared statements considering I'm using the db connection from the context of TRPC ?
Thanks
2 Replies
Angelelz
Angelelz16mo ago
You could consider the handler your TRPC function
Want results from more Discord servers?
Add your server