d

    Das135

    1 year ago
    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..
    tapac

    tapac

    1 year ago
    just create your own
    trackedTransaction
    function and use it all over your code