© 2026 Hedgehog Software, LLC

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

Is there a way to have a query- or transaction-level hook?

I want to:
- for every transaction, before statements are run, issue a query against the database to set settings
- for every query, if not in a transaction, open a transaction and set the setting, run the query, then close the transaction

Is there any recommended way to do this with drizzle?
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

Is there a way to properly type a "generic query"
Drizzle TeamDTDrizzle Team / help
8mo ago
Is there a way to call a prepared statement from within a transaction?
Drizzle TeamDTDrizzle Team / help
3y ago
Is there a smarter way to use optional query values
Drizzle TeamDTDrizzle Team / help
3y ago
Is there a way to create this query in drizzle?
Drizzle TeamDTDrizzle Team / help
16mo ago