Hello! В сообщении от Tuesday 26 August 2008 18:59:55 Igor Tandetnik написал(а): > > I don't know method to set triggers on begin and commit transaction > > events. > > You could log begin/end transaction (along with any other statements) by > installing sqlite3_trace hook. > > Another approach would be to use sqlite3_commit_hook, > sqlite3_rollback_hook, sqlite3_get_autocommit. Call > sqlite3_get_autocommit from inside your custom function to see whether > the statement is part of an explicit transaction. sqlite3_commit_hook > and sqlite3_rollback_hook tell you when a transaction ends. The first > query that's part of an explicit transaction after a previous > transaction (if any) has ended, starts a new one. > > By the way, see sqlite3_update_hook. Perhaps you could use that in lieu > of your triggers.
Thanks, it's better way for my task. But is it safe to logging uncommited changes? Best regards, Alexey. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users