Re: [gnome-db] gda_column_get_primary_key()
- From: "Vivien Malerba" <vmalerba gmail com>
- To: "Johannes Schmid" <jhs jsschmid de>
- Cc: gnome-db-list <gnome-db-list gnome org>, Murray Cumming <murrayc murrayc com>
- Subject: Re: [gnome-db] gda_column_get_primary_key()
- Date: Thu, 20 Nov 2008 15:26:29 +0100
2008/11/20 Johannes Schmid <jhs jsschmid de>
Could you give me some example then how to replace
> In V3 the information was available using the GdaDict object. In V4,
> the same information is available using the GdaMetaStruct object.
> The only difference (appart from the API) is that in V3 all the
> dictionary had to be in memory all the time even if not used whereas
> in V4 only the requested part of the dictionary is loaded in memory:
> the dictionary itself is represented by a GdaMetaStore (which uses a
> DB) and an extract of the dictionary is represented as a
gda_column_set_primary_key() in V4? I have checked the API of
GdaMetaStore and GdaMetaStruct but it's not obvious to me how that
gda_column_set_primary_key() only positionned a boolean to TRUE. If what you need is to set a boolean and then later test that boolean, you can use the g_object_set/get_data() as a replacement.
If you are talking about gda_column_get_primary_key(), to obtain information about a table's column, then you can have a look at the example at http://library.gnome.org/devel/libgda/3.99/howto-meta1.html
You can also have a look at the set_column_properties_from_select_stmt() function in the gda-data-select.c which determines some attributes for the columns of a data model resulting of the execution of a SELECT statement.
] [Thread Prev