Ā© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•3y ago•
10 replies
JT

how do you pass a query in a typesafe way?

Let's say i want to paginate a query, so I'm going to pass a query such as this to a pagination function

db.select().from(users).where(like(users.email, '%@gmail.com'))
db.select().from(users).where(like(users.email, '%@gmail.com'))

And then that pagination function will add
.limit()
.limit()
and
.offset()
.offset()
to the query. What type would I put on the function argument?
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How do you compare counts in a query?
Drizzle TeamDTDrizzle Team / help
3y ago
How do you infer the type of a relations query?
Drizzle TeamDTDrizzle Team / help
3y ago
How do you create a scalar subquery in drizzle?
Drizzle TeamDTDrizzle Team / help
3y ago
How do I query from another query?
Drizzle TeamDTDrizzle Team / help
2y ago