Elv
Elv
DTDrizzle Team
Created by Elv on 8/22/2023 in #help
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
3 replies
DTDrizzle Team
Created by Elv on 8/22/2023 in #help
Conditional insert
Hi, Is there a way to do an insert only if the result of an exists statement is true ? I would like to do it in one query instead of having to check with another query before the insert. Thanks
5 replies
DTDrizzle Team
Created by Elv on 8/17/2023 in #help
Cascade onDelete when not using FK relations
Is there a way to add a cascade on delete when declaring relations without FK ? For planetscale for example ?
9 replies