Re: [holger: Re: Logger for libgda]
- From: Holger Thon <holger gidayu mud de>
- To: gnome-db-list gnome org
- Subject: Re: [holger: Re: Logger for libgda]
- Date: Wed, 29 Nov 2000 21:12:49 +0100
Hi!
On Tue, Nov 28, 2000 at 11:09:30PM +0100, David Marín Carreño wrote:
> On 28 Nov 2000, Rodrigo Moya wrote:
>
> >
> > so, you're going to save the changes? But this is not reliable at all.
> > Imagine I use:
> >
> > UPDATE employees SET name = 'fulano';
>
> Seeking the last value of name before 'fulano'.
No, seeking all rows in column name for their last value before the query
has been issued, because it's like:
foreach field called 'name' in table employes
do
set the fields value to 'fulano'
done
This really is more complex then just looking for old data in a certain field.
You first have to get all rows that have been affected by the update query and
then the values in column name of that rows. So it's much more overhead, though
the query is short... ;-)
>
> >
> > This would be easy if you always used expressions such as:
> >
> > UPDATE employees SET salary = salary + 200;
> >
> > here, it's easy, you can recover by just doing
> >
> > UPDATE employees SET salary = salary - 200;
> >
> > But with other kind of expressions, I don't see the way you're going
> > to recover the old data when undoing.
>
> Each time we change the database, we log it. Since the creation of the
> entry, until the last modifications. All are logged. So if we want to
> undo, we look for the last modification before the modification we want to
> undo.
If logging is started with creation of the table, it's easy. If not, we have
to get the data from server before issuing COMMIT.
Ciao,
Holger
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]