Re: Logger for libgda
- From: Holger Thon <holger thon gnome-db org>
- To: David Marín Carreño <davefx bigfoot com>
- Cc: gnome-db-list gnome org
- Subject: Re: Logger for libgda
- Date: Mon, 27 Nov 2000 12:38:51 +0100
Hi!
On Mon, Nov 27, 2000 at 12:16:53AM +0100, David Marín Carreño wrote:
>
> Hello.
>
> First of all: sorry for my very bad English.
>
> My name is David Marín, and I am developer of ASPL Fact project (a billing
> and stock managing application).
>
> We are thinking about making a logger module for our application. This
> module would let us to make some-level-undo's and also would give us the
> possibility of making historical reports for a given database entry.
>
> This logger module works writing each insert/update/delete access into a
> special "Log" table of the database, which fields could be:
Just a question, if you'd be glad with one undo level:
Wouldn't it be simplier to make a db transaction and use rollback-transaction
on the server side to undo? If not, read on. ;-)
>
> * LogEntry-ID
> * User (who access the database)
> * Date
> * Time
> * Host (from where the database is accessed)
> * Table (changed)
> * Entry (changed)
> * Changes (new values of the fields, or something so).
The main problem here is, that you need to generate a query issuing the
"undo" sql statement to the server. For this, you need to know the sql
dialect a server understands. I doubt, that this would be possible on
all providers (e.g. the mail provider lacks sql), however i think this
is a great idea. Possibly, it might work with the xml-query/reporting
feature of libgda/gnome-db in future, if the server has also implemented
this feature.
> Now, we are implementing this stuff in the client-side. But we want to
> program it in the server-side. And the problem is here: we want to
> continue using libgda for accessing the database. Thus, the logger should
> be transparent for gda...
I don't think that enhancing the server code much would be a good solution.
I'm not that fit in bonobo-api, but i think the attempt should be started
on top of gda-server api, adding plugin possibilities.
Then, a plugin can directly call the gda-provider with plugin functions using
its oaf id.
Depending on the server, a different sql dialect could be selected. A generic
SQL9x conform driver should be added as well, as most databases understand it.
Another possibility would be to add such a plugin for each server, but it
would be much more overhead in my opinion.
> So we thought... why don't insert the logger into gda? We think that a
> logger module would be very useful for every program with database access.
This is of course a great idea, but i think it should be separated into a
plugin so that components remain modular and flexible.
Ciao,
Holger
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]