"Daniel Espinosa" <[EMAIL PROTECTED]> wrote:

Hi!

> > Wouldn't it be easier and more flexible to retrieve primary column name 
> > using
> > provider's reflection? I know that last_insert_id is sometimes helpfull , 
> > but in practice
> > this functionality is useless with SQLite ( IIRC ) and may foolish you with 
> > MySQL.
> >
> > Personally I would store primary column name as "application's parameter" 
> > instead of
> > fetching it with every insert command.
> 
> But how do you get the value in the primary key column for the last
> inserted row?

I do not say this API function is bad. 
I think returned gchar is not good and GValue as returned data type seems to be 
the best.
 
> What do you mean about "provider's reflection"?

I didn't check this in practice, but you could get this infor using provider's 
schema.
get_schema function with GDA_CONNECTION_SCHEMA_FIELDS identifier.

My point is that GDA *should not* abuse returned data in this particular case.
Returned GdaParameter could be ( IMO ) a bit overloaded. It's up to the 
application and developer
to get as many information as needed. So if two data are needed ( a name and 
value ) two functions
should be called instead of one.

Piotras
_______________________________________________
gnome-db-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-db-list

Reply via email to