© 2026 Hedgehog Software, LLC

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

Is there a way to get the update count resulting from a query without returning?

I would like to assert that a statement in a transaction updates only the number of rows I expect, and fail if that number is different. I can do it with
result.length
result.length
and
returning()
returning()
but that includes a ton of data I don't need.
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

Query `count` returning the wrong value
Drizzle TeamDTDrizzle Team / help
2y ago
Is this the proper way to do a count query?
Drizzle TeamDTDrizzle Team / help
3y ago
Is there a way to save the generated response Type from a query?
Drizzle TeamDTDrizzle Team / help
3y ago
Is there a way to dynamically edit a query with the builder?
Drizzle TeamDTDrizzle Team / help
3y ago