2008/12/21 Murray Cumming <[email protected]>

> On Fri, 2008-11-21 at 10:20 +0100, Vivien Malerba wrote:
> > Each field is represented as a GdaMetaTableColumn structure, the
> > is-primary-key property corresponds to the GdaMetaTableColumn.pkey
> > value,
> > or, in case you have a multiple fields PK, then all the PK fields are
> > listed
> > in the GdaMetaTable.pk_cols_array attribute.
>
> So why can't this be a simple get/set function on GdaColumn,
> http://library.gnome.org/devel/libgda/unstable/GdaColumn.html
>
> like it was in libgda-3.0?
>
> http://library.gnome.org/devel/libgda/stable/GdaColumn.html#gda-column-get-primary-key


When inspecting the properties of a table, you don't always have a
GdaColumn. Moreover when you have a GdaDataModel (resulting from executing a
SELECT), then the Primary key attribute of a column can lead to mis
interpretations (for example it could mean that the column could be
considered as a PK for the data in the data model, or it could be that the
corresponding column was effectively part of a PK constraint). So basically
one had to run a "SELECT * FROM table" to reliably get the PK columns of a
table which is not a good wy of proceeding.

Vivien
_______________________________________________
gnome-db-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-db-list

Reply via email to