SQL & merge [was Re: Welcome back]

Derek Atkins warlord at MIT.EDU
Wed Aug 18 10:36:06 EDT 2004


linas at linas.org (Linas Vepstas) writes:

> An earlier thread voiced concerns about undo for SQL backends.
> If an SQL db can support transactions, then there already is a 
> natural undo mechanism.   Postgress supports this, I don't think
> mysql does.  

That would be me...

> Thus, it could work, in principle, as follows:
>
> ;; on gnucash startup, issue the SQL BEGIN statement;
> ;; user does gui stuff, such as hand-entering, or lots of merge, etc.
> ;; user clicks on "save" menu entry, which causes the SQL COMMIT to be
>       issued.
> ;; user fails to click on save, and instead chooses 'exit w/o save'
>       in which case we do an SQL ROLLBACK, and all changes up to
>       the previous BEGIN are dumped by the SQL db.

In which case we're no better than the current file backend and users
can still lose data if gnucash crashes..  (unless closing the database
connection is considered a 'commit').

> Thus it gets file-system like semantics.  Unfiortuantely, I don't think
> one can nest begins/commits :(

You also lose multi-user support, too..  :(

> Anyway, I'll keep this in mind during the SQL backend work.

Honestly, what I'd like to see is a QOF-level 'history' log where you
can revert the history....

   <Menu> -> Edit -> Undo
   <Menu> -> Edit -> Redo

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list