Re: [gnome-db] GdaDataModel statement type



Vivien Malerba pisze:

Hi!

>> Is it possible to change GdaDataModel's statement type?
>> I have model created by gda_connection_statement_execute_select, and
>> want to set values and reuse it with update statement.
> 
> You have to set the update statement using
> gda_data_select_set_modification_statement(), but maybe I understand
> wrongly your needs (if that is the case, can you explain it using for
> exampe pseudo code?)

1. GdaDataModel model = gda_connection_statement_execute_select(...)

/* User level actions which reads/writes model data, as it is used as
underlying data storage */
2. gda_data_model_set_value_at (model, n, y, NULL);

3. update or delete or nothing

gda_data_select_set_modification_statement would do the trick, but in
such scenario I need to set values which are held by model before I
actually may create particular GdaStatement.

In other words. GdaDataModel is used as persistent (in memory) data
storage, so I avoid duplicating its values when user needs read/write.

Copying DataModel is not an option cause it's real performance bottleneck.

Piotras


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