SQL & merge [was Re: Welcome back]
Linas Vepstas
linas at linas.org
Wed Aug 18 09:27:49 EDT 2004
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.
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.
Thus it gets file-system like semantics. Unfiortuantely, I don't think
one can nest begins/commits :(
Anyway, I'll keep this in mind during the SQL backend work.
--linas
--
pub 1024D/01045933 2001-02-01 Linas Vepstas (Labas!) <linas at linas.org>
PGP Key fingerprint = 8305 2521 6000 0B5E 8984 3F54 64A9 9A82 0104 5933
More information about the gnucash-devel
mailing list