Re: [holger: Re: Logger for libgda]



> > yes, another problem that is raised now. Special care should be taken to
> > avoid this. And I ask
> > again: how could we do that?
> 
> After any change in the database, the log mustn't save the old status. It
> must save the changes. It is slower when undoing, but it hasn't this
> problem.
> 
> And the log must be written only when the transaction has already 
> finished.
> 

so, you're going to save the changes? But this is not reliable at all.
Imagine I use:

UPDATE employees SET name = 'fulano';

ok, what you save here? that employees.name was set to 'fulano'? This is
ok, you've got a log of
what you've done in the DB. But, how will you recover the old data?

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.

> > > Hope this problems can be solved, because i think having multiple
> > > undo levels on transactions is a great idea and a valuable feature
> > > for libgda!
> >
> > I also like the idea of having the logger in GDA, but only if we find
> > a good way of handling all these problems (and others that will
> > appear). But remember that if it's going to be in GDA, it should be as
> > generic as possible, making it suitable for ANY data source supported
> > by GDA.
> 
> I cannot see any problem here... Sorry ;-)
> 
the undoing stuff is the problem. I'd implement just a logger in 3/4 hours,

but the undoing stuff... I can't see the way we'll implement it.

cheers





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]