Hello !  

?  

This request is a common requirement and in my opinion would be better solved
by an extension to the actual sqlite3 api functions.  

?  

Actually there is sqlite3_trace that can be used to watch all sql statements
executed on a given session.  

?  

One possible way would be to add another parameter that could be a bitwise
flag to indicate wich kind of statements we want to watch.  

?  

With that would be trivial to log the statements that change the database to
replicate elsewhere.  

?  

?  

?  

#define SQLITE_TRACE_DML 0x0001  

?  

#define SQLITE_TRACE_SELECT 0x0002  

?  

#define SQLITE_TRACE_INSERT 0x0004  

?  

#define SQLITE_TRACE_UPDATE 0x0008  

?  

#define SQLITE_TRACE_DELETE 0x0100  

?  

void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*, int
what_to_trace);  

?  

?  

?  

Cheers !  

?

Reply via email to