At 19:58 04/08/2011, Stephan Beal wrote: >Hi, all! > >http://www.sqlite.org/whentouse.html > >says: > >"Temporary triggers can be added to the database to record all changes into >a (temporary) undo/redo log table. These changes can then be played back >when the user presses the Undo and Redo buttons. Using this technique, an >unlimited depth undo/redo implementation can be written in surprisingly >little code." > >i'm wondering if anyone can point me to an example of implementing such a >beast?
I have not do it but you can mimic/implement it using 2 colums in each table and inserting there the transaction number (insert, update, delete only) and delete status. Updates duplicates rows with different transaction number (bigger one), Delete duplicate row and marks it as delete. To restore a previous point select * from table where transaction_id<previous_point_transaction_id The current rows are select distinct * from table where (your where clause) order by transaction_id desc limit 1 It's like a mvcc. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users