Hi,

In a project I'm working on we need to have a mechanism that creates
notifications when something happens in any given table.
For example, for updates, we implemented something like:
 - create a ON UPDATE trigger in the target table
 - the trigger calls a custom function with every necessary column as an
argument (old and new data)
 - the custom function stores the old and new data
 - on commit (sqlite3_commit_hook), the data is sent as an event
 - on rollback the data is discarded

The insert and delete events are exactly the same except without the old
and new data respectively.
So my question is: is this the best approach? This method works but is also
a bit complex and I wasn't able to come up with something simpler (for
example I know we cannot use sqlite3_update_hook to retrieve data).

Thanks,
João Ramos
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to