© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•3y ago
yoggyd

totalCount from relational query

is it somehow possible to get the total count of a relational query?

Core queries aren't possible here due to a bug in how drizzle builds the column identifiers (multiple columns have the same name here and duplicates are discarded, resulting in
undefined
undefined
values)

I thought maybe I could utilize CTEs here but then how would I get the benefit of relational queries?

Is string manipulation really the only option here?
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

Nullable relational query?
Drizzle TeamDTDrizzle Team / help
3y ago
Relational query problem
Drizzle TeamDTDrizzle Team / help
3y ago
How to derive type from relational query?
Drizzle TeamDTDrizzle Team / help
3y ago
advanced relational query builder
Drizzle TeamDTDrizzle Team / help
3y ago