Re: [gnome-db] Auto-updated GdaMetaStore?





2009/1/12 Armin Burgmeier <armin arbur net>
On Fri, 2009-01-09 at 16:02 +0100, Vivien Malerba wrote:
>
>
> 2009/1/9 Johannes Schmid <jhs jsschmid de>
>         Hi!
>
>         OK, I think I got kind of a clue now. Seems I had some
>         postgres
>         permission problems but I fixed them now.
>
>         Anyway, it seems that update_meta_store() with no further
>         arguments is
>         working fine after an ALTER TABLE statement. But what would
>         actually be
>         much more useful, would be to update the meta store for a
>         single table
>         like you can specify with get_meta_store_data():
>
>         g_value_init (&value, G_TYPE_STRING);
>                g_value_set_static_string (&value, "customer");
>                model = gda_connection_get_meta_store_data (cnc,
>         GDA_CONNECTION_META_FIELDS, &error, 1, "name", &value);
>
>         I would just like to update the meta_store for the table
>         "customer". I
>         am kind of lost in the database schema the documentation
>         provides for
>         GdaMetaStore.
>
> I know the doc is not up to the expectations... anyway, you can use a
> specific GdaMetaContext for this purpose. See the attached test case.

When doing such a partial metastore update for a specific table, then
the types (GTypes) of all fields collapse to gchararray (at least for
postgresql). Do I maybe need to update something else than "_tables" to
get the column types correctly?

Here is a testcase. After doing a complete metastore update, the types
are correct, but when doing a partial update after that (without
changing anything else in the database), all types become gchararray:

http://arbur.net/stuff/partial-metastore-update-types.c

Thanks,
Armin

Strange... I'll have a look ASAP.

Vivien


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