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?
Was this page helpful?