Next.js Discord

Discord Forum

nextjs separate sql query in a different file

Unanswered
Transvaal lion posted this in #help-forum
Open in Discord
Avatar
Transvaal lionOP
Using this example: https://github.com/vercel/nextjs-postgres-nextauth-tailwindcss-template/blob/main/app/page.tsx#L19C24-L19C27

is it possible to separate all these queries in different files?

SELECT id, name, username, email 
    FROM users 
    WHERE name ILIKE

in case I have a lot of queries?

0 Replies