Hi! On 2018-10-05 19:39, Simon Slavin wrote: > On 5 Oct 2018, at 6:17pm, Daniel Kraft <d...@domob.eu> wrote: >> If there is indeed no way to achieve my requirements with SQLite > > There isn't. I understand what you want and SQLite can't do it.
Ok, thanks for confirming -- that's unfortunate for me, but certainly good to know (so I won't try doing it and fail after wasting time). I'm still thinking about the savepoints that Chris pointed out, though. They seem to be very close to what I need. And even if I don't commit the transaction, I imagine that at least the database connection that is building it sees the updated state also for SELECT's, right? That's enough for me since I only have a single-user situation anyway. However, it seems that unfinished transactions / savepoints cannot be persisted when closing the database (which I would need). > Another way to simulate it is to keep a log of each SQL command which changes > the database in, for example, a table called "changeLog". This needs just > two rows: tbe normal INTEGER rowid column SQLite makes for most tables, and a > TEXT column for the SQL command. You also add a row to this table when the > programmer wants to create a snapshot. > > Then, to restore the database as it is at a snapshot point, just start with > blank tables and process all commands up to the savepoint. That's an interesting approach. I might be able to do something like this in my situation, but need to think about it some more. Yours, Daniel -- https://www.domob.eu/ OpenPGP: 1142 850E 6DFF 65BA 63D6 88A8 B249 2AC4 A733 0737 Namecoin: id/domob -> https://nameid.org/?name=domob -- 3.6.0: Bar-Pri-Ran-Rog-Sam-Val-Wiz To go: Arc-Cav-Hea-Kni-Mon-Tou
signature.asc
Description: OpenPGP digital signature
_______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users