Re: [gnome-db] gda_connection_execute_command() result
- From: Murray Cumming <murrayc murrayc com>
- To: Vivien Malerba <vmalerba gmail com>
- Cc: gnome-db-list gnome org
- Subject: Re: [gnome-db] gda_connection_execute_command() result
- Date: Sat, 21 Oct 2006 16:23:02 +0200
On Sat, 2006-10-21 at 16:07 +0200, Vivien Malerba wrote:
> You get as many items in the retunred GList as there are queries
> (separated by ";") in the command. For example it the command was made
> with "SELECT * FROM mytable; DELETE FROM mytable" then you'd get first
> a GdaDataModel for the 1st query and then a GdaParameterList for the
> 2nd. I'll update the documentation to make this clear.
Thanks.
Is there any good reason to support multiple queries separated by ;? Is
that for atomicity? If there's no good reason then this seems to be
complicating the API unnecessarily.
[snip]
> We can only return one list because the index in the list of a
> GdaDataModel or GdaParameterList corresponds to the query in the
> command at the same index.
That's also something worth mentioning explicitly in the documentation.
> > or
> > - Making this function private and just having a execute method for
> > select and an execute method for parameters?
>
> You cant' always know in advance which query whill return what. For
> example a "DESCRIBE" query in MySQL will return a GdaDataModel even
> though it does not start with "SELECT".
>
> But if you know in advance what's in your command, then use one of the
> other functions I mentioned. I'll also update the documentation in
> this regard.
>
--
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]