[gnome-db] Last insert feature request



For today gda_server_provider_get_last_insert_id () returns a gchar*,
but what about to return a GdaParameter?

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.

-- 
Trabajar, la mejor arma para tu superación
"de grano en grano, se hace la arena" (R) (entrámite, pero para los
cuates: LIBRE)


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