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



--- "reinecke fox gmx net" <reinecke fox gmx net>
wrote:
> 
> 
> hello together,
> I'm new to libgda, so I took some time to review
> your library the last days:
> its great, thanks for your work !
> 
> I'm looking for a mechanism to watch the changes
> made in a table ...
> Is it possible to define a listener (and a callback)
> that monitors a table and throws the
> callback or a signal if one of the typical
> DML-commands (insert, update, delete) ran ???
> 
> The program I'm writing is a service, what has to
> make some actions, if the data in
> the monitored table was changed from outside (maybe
> by a webfrontend or anything else)...
> 
> PostgreSQL has TRIGGERS implemented to support such
> requirements. But I 
> really don't want to use libpq ;) Can I use libgda
> to use such postgres triggers ?
> 
> Maybe I found a usable mechanism within the
> GdaDataModel - e.g. the gda_data_model_row_inserted
> function and others. Within the
> 'gda_data_model_changed()' function documentation,
> listeners
> are spoken to - but where can I define one ? I
> couldn't find any listener defining function in the
> lib. I think I was blind ;)
> 
> I hope there's any possibility to bypass the
> inefficient table polling, I had to use before.
> 
> Thanks in advance for some help.
> darius

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


>>>>>>>>>>>>>>>
Trabajar es la mejor arma para tu superación.

_________________________________________________________
Do You Yahoo!?
La mejor conexión a internet y 2GB en tu buzón de Correo Yahoo! por $100 al mes. http://net.yahoo.com.mx



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