Is there any type of interceptor implementation in SQLite?

I want to know, is there a way to intercept DML operations in sqlite? I am looking to implement something like an audit system to extract inserts and updates on the database, and record changes in these events.

I have seen the use of triggers, but this is not enough, because There is no way (I know) to define a global trigger, and manually managing triggers for more than 100 tables does not sound like a good idea… longterm!

I am open to any suggestions, so please fire!

Maybe, this is what you need
SQLite Callback Function for Trace/Logging Query Statements < p>

If you use C/C++ to code your application, you can add a hook to the SQLite API by providing a callback function, which will call the sqlite_trace function to record the query statement.

p>

I want to know, is there a way to intercept DML operations in sqlite? I am looking to implement something like an audit system to extract inserts and updates on the database, and record changes in these events.

I have seen the use of triggers, but this is not enough, because There is no way (I know) to define a global trigger, and manually managing triggers for more than 100 tables does not sound like a good idea… longterm!

I am open to any suggestions, so please fire!

Maybe, this is what you need
SQLite Callback Function for Trace/Logging Query Statements

If you use C/C++ encodes the application, then you can add a hook to the SQLite API by providing a callback function, which will call the sqlite_trace function to record the query statement.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 925 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.