Re: [gnome-db] Minor API change and MySQL [update/delete]_row



On Thu, 2003-10-30 at 02:18, Paisa Seeluangsawat wrote:
> > right. That is, we remove all the const's in the API, except for things
> > like gda_value_get_string and so on.
> 
> Since I have gda-data-model.[ch], gda-row.[ch] hanging around
> uncommited, I'll implement this and send in a patch.
>
cool

>   So here're what
> we've decided,
> 
>   1) remove const from GdaRow* and GdaValue* in both function
>      arguments and return types.
> 
yes

>   2) There's only one _model_get_row().  The user should check with
>      _is_updatable() to see the model can be updated.
> 
yes

> Here're what's left to be decided,
> 
>   3) The conditions for insertable and editable sql model are
>      different.
> 
could you tell me a case where a recordset on database can be upated but
no more rows can be inserted?

>        insertable:  have all non-null columns that have no default values
> 
>        updatable:   have at least one non-null unique key
> 
>      Should we replace _is_editable() with _is_updatable() and
>      _is_insertable()?
> 
if needed, yes, but can you show us an example of when that might be
needed?

>   4) Are these staying or going away?
> 
> 	(gda_data_model_begin_edit):
> 	(gda_data_model_end_edit):
> 	(gda_data_model_cancel_edit):
> 	(gda_data_model_is_editing):
> 
I think they should, so that data models can do their initialization.
For instance, Oracle will start transaction for updating that table, all
providers will create a temporary area to store the old values of the
modified rows, etc. I think they should stay, unless we decide to do
that initialization in some other way. What do you think?

>   5) Do we want a separate header for functions that only providers[1]
>      use?  -- we can still commit while this is being decided.
> 
those functions are not only used by providers, as I said. Any app can
create its data model-based class, and in that case it will need those
functions. Just add a comment to the header file that those functions
are to be used by data models implementations. But I don't see a need
for a separate header.

cheers




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