Hey guys! Please, does Exposed provide any mechanism how to "intercept" query executions before I ca...
d
Hey guys! Please, does Exposed provide any mechanism how to "intercept" query executions before I call database? My use-case is to store all database operations that were executed. We have Exposed code spreaded on multiple places in code, so it would be perfect to handle this functionality on one place instead of writing some methods to all
transaction {}
blocks. It is possible? Thank you!
I found that I can extend my custom class from
StatementInterceptor
, but I need to register it in each
transaction {}
block. This does not work when I use nested transaction blocks..
t
just create your own
trackedTransaction
function and use it all over your code