Re: [gnome-db] Last insert feature request
- From: "Daniel Espinosa" <esodan gmail com>
- To: "Piotr Pokora" <piotrek pokora gmail com>
- Cc: gnome-db-list gnome org
- Subject: Re: [gnome-db] Last insert feature request
- Date: Wed, 5 Dec 2007 17:40:21 -0600
2007/11/28, Piotr Pokora <piotrek pokora gmail com>:
> On Wed, 28 Nov 2007 10:55:32 -0600
> "Daniel Espinosa" <esodan gmail com> wrote:
>
> > 2007/11/28, Murray Cumming <murrayc murrayc com>:
> > >
> > > 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.
>
But how do you get the value in the primary key column for the last
inserted row?
What do you mean about "provider's reflection"?
--
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]