zendev
Explore posts from serversDTDrizzle Team
•Created by zendev on 10/26/2023 in #help
Infinite scroll w/ Drizzle + tRPC
Has anyone implemented infinite scrolling/pagination using Drizzle? The example in the tRPC docs uses Prisma, which has a built-in cursor parameter for pagination. What would one use for Drizzle?
https://trpc.io/docs/client/react/useInfiniteQuery
8 replies
DTDrizzle Team
•Created by zendev on 10/5/2023 in #help
How do relational queries work under the hood?
Just trying to further my understanding of how drizzle works - how would the following relational query be written using the sql-like drizzle syntax?
4 replies
DTDrizzle Team
•Created by zendev on 9/27/2023 in #help
get drizzle to correctly infer type with limit 1
If you do something simple like this:
Drizzle seems to infer the type of user as an array , in spite of specifying limit(1) which should only return one row from the users table.
What is the best way to get the correct type of user, which should be
25 replies
DTDrizzle Team
•Created by zendev on 9/26/2023 in #help
environment variables undefined in drizzle.config.ts
I have my config set up like this:
But when I try to run from my scripts, it throws my error designed to catch when is undefined. I can't figure out why it's coming up as undefined here though since it definitely does have a value, it even works when running migrations and such.
I used create-t3-app for this project btw
4 replies
DTDrizzle Team
•Created by zendev on 9/19/2023 in #help
Docs unclear on connection pool vs. direct connection
In the docs under "Supabase" it teaches you how to setup Drizzle w/ supabase. The last part shows how to set up the connection:
But underneath it simply says:
Connect to your database using the Connection Pooler for serverless environments, and the Direct Connection for long-running servers.
I'm assuming the code above is for Direct Connection? If that is the case, why is there no implementation demonstration for the Connection Pooler? Also isn't Supabase always going to be serverless? Maybe I'm missing something but this just feels confusing
17 replies