Re: [gnome-db] trigger

On 3 June 2010 08:54, Andrea Zagli <azagli libero it> wrote:
> Il giorno mer 02 giu 2010 12:01:50 CEST, Vivien Malerba ha scritto:
>> On 2 June 2010 11:35, Andrea Zagli <azagli libero it> wrote:
>>> i would like to realize on my applications, based on libgda, something
>>> similar to trigger
>>> is there some function/signal to make it possible? for example 2 signals
>>> named "before-non-select-execution" and "after-non-select-execution" on
>>> GdaConnection
>> The GdaConnection object does not emit any signal before or after
>> having executed a statement, but this could easily be added, and now
>> is the correct timeframe for this as the next stable version is not
>> far away...
>> Please tell me exactly what you need and I'll see how to implement it.
> currently, the two signals above are enough for me
> i'll use them to "interface" my applications with a small library that i
> wrote that saves every change on a db; so in return i need for example an

Why don't you then just wrap the gda_connection_statement_execute*()
functions to do this? It seems easier for me, because if you use
GdaConnection's signals then you'll also receive signals for your own
statement's execution (so you'll have to disconnect from these to
avoid an infinite loop, but if the connection is used from another
thread things will get more complicated).

> object that represents each parts of an sql statament to obtain the key
> (because i must select the same record edited by the statement)
> i tought that last part was possibile with GdaSqlBuilder; but i just saw
> that GdaSqlBuilder (and GdaStatement) only construct the sql statament,
> without return the sql parts
> i think it can be very useful to have the sql statement separated in objects
> that can be more easly manipulated than a string

The GdaStatement has a "structure" property which returns a pointer to
a new GdaSqlStatement structure which you can explore in the same way
you explore an XML DOM tree, see


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