[gnome-db] libgda-4.0 changes
- From: Murray Cumming <murrayc murrayc com>
- To: gnome-db-list <gnome-db-list gnome org>
- Subject: [gnome-db] libgda-4.0 changes
- Date: Tue, 08 Apr 2008 21:10:59 +0200
The libgda-4.0 API reference is now online, and it contains information
about the changes between libgda-3.0 and libgda-4.0:
http://library.gnome.org/devel/libgda-4.0/unstable/migration-2.html
I have some comments from my initial tests:
1.
Creating and executing SQL statements was never easy but it is now even
more awkward than before because you must create a GdaSqlParser and use
it, and check for an error when doing that:
libgda-3.0:
GdaCommand* command = gda_command_new("SELECT * FROM album",
GDA_COMMAND_TYPE_SQL, GDA_COMMAND_OPTION_STOP_ON_ERRORS);
GdaDataModel* model =
gda_connection_execute_select_command(connection, command, NULL /*
params */, &error);
libgda-4.0:
GdaSqlParser* parser = gda_connection_create_parser(connection);
error = NULL;
GdaStatement* statement = gda_sql_parser_parse_string(parser,
"SELECT * FROM album",
NULL /* remain */, &error);
g_object_unref(parser);
if(error)
{
printf("GError from gda_sql_parser_parse_string(): %s\n",
error->message);
g_clear_error(&error);
return EXIT_FAILURE;
}
GdaDataModel* model =
gda_connection_statement_execute_select(connection, statement,
NULL /* params */, &error);
2.
The list of removed objects and functions needs information for eacho
one about what should be used now:
http://library.gnome.org/devel/libgda-4.0/unstable/ch07s05.html#id2561757
3.
The
GdaParameterList to GdaSet
and GdaParameter to GdaHolder
rename seems arbitary.
I guess that GdaSet should really be GdaValueSet or GdaValueList. Is it
used for anything other than executing statements?
GdaHolder is a particularly obscure name. If not GdaParameter then maybe
GdaNamedValue?
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]