Re: [gnome-db] gda_column_get_primary_key()





2008/11/20 Johannes Schmid <jhs jsschmid de>
Hi!

> 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
> GdaMetaStruct.

Could you give me some example then how to replace
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
should work.

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.

Regards,

Vivien



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