[sqlite] The Session Extension (future SQLite extension)

2016-05-07 Thread Dave Wellman
My apologies if this has already been raised...

When I first read about this I thought (assumed) that 'changes' were meant
to be just data changes, i.e. changes to rows where they have been inserted,
updated and/or deleted. In my experience a fairly typical journaling
function that a number of dbms's offer. A typical use case for this would
be: run the 'real' processing on the production system, copy the journal
information (what is referred to as the 'changeset'  or 'patchset') to a
backup system and then apply the same changes to that system. This is one
way of keeping a disaster recovery environment up to date.

However, the documentation includes the following: "They work all day, in
parallel, each making their own customizations and tweaks to the design. "

Does the "to the design" imply that this feature would also cater for DDL
changes to tables, indexes etc.?

Cheers,
Dave


Ward Analytics Ltd - information in motion
Tel: +44 (0) 118 9740191
Fax: +44 (0) 118 9740192
www: http://www.ward-analytics.com

Registered office address: The Oriel, Sydenham Road, Guildford, Surrey,
United Kingdom, GU1 3SR
Registered company number: 3917021 Registered in England and Wales.

-Original Message-
From: sqlite-users-boun...@mailinglists.sqlite.org
[mailto:sqlite-users-bounces at mailinglists.sqlite.org] On Behalf Of Zsb?n
Ambrus
Sent: 07 May 2016 11:40
To: SQLite mailing list
Subject: Re: [sqlite] The Session Extension (future SQLite extension)

As for the session extension
"https://www.sqlite.org/draft/sessionintro.html;, what I'd like to ask is
when this is more useful than the RBU extension "http://sqlite.org/rbu.html;
?  The two seem to serve a similar purpose.

Ambrus
___
sqlite-users mailing list
sqlite-users at mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



[sqlite] The Session Extension (future SQLite extension)

2016-05-07 Thread Zsbán Ambrus
As for the session extension
"https://www.sqlite.org/draft/sessionintro.html;, what I'd like to ask
is when this is more useful than the RBU extension
"http://sqlite.org/rbu.html; ?  The two seem to serve a similar
purpose.

Ambrus


[sqlite] The Session Extension (future SQLite extension)

2016-05-06 Thread Simon Slavin

On 6 May 2016, at 1:51pm, Richard Hipp  wrote:

> I bungled the copy/paste of that URL.  Should be
> https://www.sqlite.org/draft/sessionintro.html

That's very interesting.  I note that



says "This function does not change the order in which changes appear within 
the changeset. It merely reverses the sense of each individual change.".

This will not be useful to anyone trying to undo a set of changes to one row.

CREATE TABLE testTable (theText TEXT)
INSERT INTO testTable VALUES ('A')
-- session starts here
UPDATE textTable SET theText='B'-- changes A to B
UPDATE textTable SET theText='C'-- changes B to C
-- session ends here

Inverting that without reversing the order will yield

-- changes B to A (documentation suggest that this might be ignored ?)
-- changes C to B

The result would be to leave the value at B, which was true neither at the 
beginning nor end of the session.

Are we meant to iterate backwards through the inverted changeset ?  I don't see 
a way to do it.

Simon.