On Wed, 28 Nov 2007 10:55:32 -0600 "Daniel Espinosa" <[EMAIL PROTECTED]> wrote:
> 2007/11/28, Murray Cumming <[EMAIL PROTECTED]>: > > > > On Tue, 2007-11-27 at 18:36 -0600, Daniel Espinosa wrote: > > > For today gda_server_provider_get_last_insert_id () returns a gchar*, > > > but what about to return a GdaParameter? > > > > Why not just return a GValue* ? > > > > Becouse a GValue doesn't have a "name" property, that could be set to > the field's name used to get the value from. With this name the > developer will know how create the SQL to get the last inserted value, > for example in PostgreSQL: 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. Piotras _______________________________________________ gnome-db-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gnome-db-list
