SQLite Forum

SQLite query logs implementation
Login
I try implement a query log by hook sqlite3Step, is this the only function that I need to take care to log all database changes?

I will try disable date/random/PRAGMA function in database.

I will use sqlite3_expanded_sql to get the query SQL, skip SQLITE_SCHEMA result.

I will skip sqlite3_stmt_readonly(stmt) step,  except BEGIN/COMMIT/Rollback/SAVEPOINT/RELEASE query.  Is there any other readonly query I should not skip?

I will use sqlite3_commit_hook/sqlite3_rollback_hook to save the query logs or drop the query logs.


I want to make sure to execute them one by one will results in same database.  (I will make sure execute them in same SQLite version)

With this logs I can reduplicate it to raft group, or master/slave node.