Re: [gnome-db] GdaDataModel signals
- From: "Vivien Malerba" <vmalerba gmail com>
- To: "Massimo Corà" <maxcvs email it>
- Cc: gnome-db-list gnome org
- Subject: Re: [gnome-db] GdaDataModel signals
- Date: Fri, 8 Jun 2007 11:12:32 +0200
On 6/8/07, Massimo Corà <maxcvs email it> wrote:
Hi guys,
I'm gonna ask here this question because I didn't find the answer elsewhere.
Well suppose I have a GdaDataModel, which has been obtained from a
gda_connection_execute_select_command () on a sqlite database.
I connected the data_model to 'row_inserted', 'row_updated' etc.
signals, then I created another command which inserted a row into that
sqlite database. I was using the same GdaConnection too.
But unfortunately no signal was raised, and so no callback called.
Is GdaDataModel a rowset which detects changes into database? Or is it
like a CachedRowSet in Java [an offline rowset with no notifications of
changes in db data]?
The data model retuned when executing a query does not detect changes
made in the database (in fact I don't know if any DBMS offers an API
to do so, if you have any example, please tell me). I think it's like
a CachedRowSet in Java.
A GdaDataModel emits the signals you mention only when its contents
changes, but the GdaDataModel returned when you execute a query
generally (this depends on the DBMS provider and of course on the
actual SELECT query) cannot be modified (the data it contains is
read-only).
I any case the data model returned is not impacted by any other
modification you make on the database (even if it's on the same
connection).
Now there is the GdaDataModelQuery object which lets you run a SELECT
statement and any modification you make to the data model is
translated into the correcponding UPDATE, INSERT or DELETE queries, so
the database is modified in the same way as the data model is
modified.
what about if I insert/update a row from an external sqlite console?
Then you'll see the changes you made if you execute the query again.
Regards,
Vivien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]