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* ? > If you return a GdaParameter the implementator will know the data type > to return and will set the correct GType and GValue pair to the > returned object. > > Then the developer could use this GdaParameter to find the a value in > the database using a query like: > > SELECT * FROM ## /* name=parameter_name type = parameter_type */ = ## > /* name=parameter_value type=parameter_type */ > > This could help when the program insert values in the DB and needs to > use it inmediately, and will avoid a DBMS specific hack for each one. > > Even could exist a > > GdaDataModel* gda_connection_get_last_inserted > > This function will use the GdaParameter returned by the > gda_server_provider_get_last_insert_id function to return a > GdaDataModel with just one row with the last inserted row in the DB. > > The new function could be called: > > GdaParameter* gda_server_provider_get_last_inserted_id > (GdaServerProvider* provider) > > in order to avoid API break in the 3.x series. > -- [EMAIL PROTECTED] www.murrayc.com www.openismus.com _______________________________________________ gnome-db-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gnome-db-list
