[gnome-db] gda_connection_execute_command() result



The documentation for gda_connection_execute_command (pasted below) is
not clear to me, particularly

"The return value is a GList of #GdaDataModel's, and #GdaParameterList".

This seems to mean that the GList* contains some GdaDataModels and some
GdaParameterLists. If so, what's the sequence or way to identify each 
element? And what would the GdaParameterList items tell me? Where is
this demonstrated in example code?

Please note also that, because it's so odd to have 2 types of element in
a GList, people are likely to interpret this text as just meaning that
the params parameter is an output parameter. That guess would be
reinforced by the missing const for that parameter.


/**
 * gda_connection_execute_command
 * @cnc: a #GdaConnection object.
 * @cmd: a #GdaCommand.
 * @params: parameter list for the commands
 * @error: a place to store an error, or %NULL
 *
 * This function provides the way to send several commands
 * at once to the data source being accessed by the given
 * #GdaConnection object. The #GdaCommand specified can contain
 * a list of commands in its "text" property (usually a set
 * of SQL commands separated by ';').
 *
 * The return value is a GList of #GdaDataModel's, and #GdaParameterList
which you
 * are responsible to free when not needed anymore (and unref the
 * data models and parameter lists when they are not used anymore). See
the documentation
 * of gda_server_provider_execute_command() for more information about
the returned list.
 *
 * The @params can contain the following parameters:
 * <itemizedlist>
 *   <listitem><para>a "ITER_MODEL_ONLY" parameter of type
#G_TYPE_BOOLEAN which, if set to TRUE
 *             will preferably return a data model which can be accessed
only using an iterator.</para></listitem>
 * </itemizedlist>
 *
 * Returns: a list of #GdaDataModel and #GdaParameterList or %NULL, as
returned by the underlying
 * provider, or %NULL if an error occurred.
 */
GList *
gda_connection_execute_command (GdaConnection *cnc, GdaCommand *cmd,
				GdaParameterList *params, GError **error)
 
-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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