I'm wondering, is there a way to intercept DML operations in sqlite?? I'm looking to implement a something like a audit system to pickup inserts and updates on the database and log the changes on these events.
I've looked at using triggers but that didn't suffice as there was no way(that I know of) to define a global trigger, and manually managing triggers for over 100 tables doesn't sound like a good idea...longterm!
I'm open to any suggestions, so please fire away!
Perhaps, this is what you would need SQLite Callback Function for Trace/Logging Query Statements
If you are coding your app in C/C++, then you have the luxury of adding a hook to the SQLite API by providing a callback function that would invoke sqlite_trace function for logging the query statements.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With