Re: [gnome-db] Last insert feature request
- From: Murray Cumming <murrayc murrayc com>
- To: Daniel Espinosa <esodan gmail com>
- Cc: gnome-db-list gnome org
- Subject: Re: [gnome-db] Last insert feature request
- Date: Wed, 28 Nov 2007 10:14:47 +0100
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.
>
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]