You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to execute SQL commands inside the hook methods. These commands must be on the same transaction of the original command. I mean the one triggered by the programmer using the database/sql API. I have to do this transparently. Do you think it is feseable and straightforward to implement? I guess I would have to add extra parameters to the hook methods' signatures. However, I am wondering how I could append these extra comands to the ongoing transaction.
The text was updated successfully, but these errors were encountered:
fadc80
changed the title
Executing SQL commands inside hook methods
SQL commands inside hook methods
Feb 19, 2020
I'm not sure if sqlhooks can attach to transactions, but if that's the case, I think you could use the context to save a reference to the tx and then retrieve it.
Again, I'm not sure about this.
I would like to execute SQL commands inside the hook methods. These commands must be on the same transaction of the original command. I mean the one triggered by the programmer using the database/sql API. I have to do this transparently. Do you think it is feseable and straightforward to implement? I guess I would have to add extra parameters to the hook methods' signatures. However, I am wondering how I could append these extra comands to the ongoing transaction.
The text was updated successfully, but these errors were encountered: