Re: [gnome-db] trigger support or simulation with libgda ?



> > 
> > In LibGda 1.3.1 GdaDataModel is a GObject, then you
> > can associate a callback to any event. The events know
> > sopported are:
> > 
> > changed
> > row_inserted
> > row_updated
> > row_removed
> > column_inserted
> > column_updated
> > column_removed
> > begin_update
> > cancel_update
> > commit_update
> 
> This would not work to be notified of a table's contents change as the
> data model notifies of changes made to its own contents (defined in
> any way you want).
> 
> Postgres has the notification system which allows to be notified of a
> named condition which has to be "emitted" by the NOTIFY command. The
> condition then needs to be emitted by a trigger. This is not really
> portable...
> 
> Libgda has support for notifiction propagation through the
> "event-notification" signal of the GdaClient object. However for now
> the only events to be notified do not include table content change.
> More work would be required to add such support, but it is doable.
> 
> Vivien


however it could be possible to use an event of the GdaDataModel object
by polling a source-table to fill the GdaDataModel contents. A change
in the table produces an update in GdaDataModel (by polling) what provokes 
the event-execution. A not very nice workaround, I know - but maybe usable. 
I'm not sure... Can anyone affirm this idea?

a general note to this topic:
Do you think the discussed feature is interesting enough to implement to libgda?
For a long time, I'm looking for a database abstraction layer supporting any
content change notification - without any success :-(

darius






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