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





2008/12/23 Murray Cumming <murrayc murrayc com>
On Tue, 2008-12-23 at 11:13 +0100, Vivien Malerba wrote:
>
>         By the way, is there explicit libgda API (not hand-coding a
>         SQL ALTER
>         statement) that we could use instead?
>
> The GdaSqlOperation is there for this purpose. See for example
> http://library.gnome.org/devel/libgda/unstable/ddl_example.html.

Thanks. And will the metastore be updated automatically when using that
API?

Yes, this will be the case.
 



By the way, I find that API quite awful so I'm unlikely to use it even
if it makes my code more portable across database servers. Like the
current metastore update API, I hate the use of these cryptic strings.
For instance:

gda_server_operation_set_value_at (op, "products", &error,
"/TABLE_DEF_P/TABLE_NAME")) goto on_set_error;

I much prefer explict API such as set_table_name(),
add_field_to_table(), and change_table_definition().

The problem with explicit API is that you end up with a very long list of symbols, especially if one wants to include every database's specificities, considering not only tables operations but all sorts of operations (on indexes, triggers, stored procedures,...) which are not yet implemented.

A solution will probably be to include API for common operations such as the ones you mention, and then still have a generic API (the existing one) for database's specificities.

Anyway, this is for post V4.
 




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