Next.js Discord

Discord Forum

Should I split my db queries?

Unanswered
Rhinelander posted this in #help-forum
Open in Discord
RhinelanderOP
Hey, I am working on bit larger project that usual and I am asking myself is it good if I use Prisma as usual inside the components / pages that need that or should I split that somewhere else so that moving to something like drizzle in future - if needed would be easier. What is your opinion.

1 Reply

Before I used to place all queries in data.ts and actions.ts single files.

But recently, I create a single data.ts, and actions.ts for each "module".

This is prolly easy to navigate, and "LLM Friendly".

But ofcourse way too many files, with similar names.