Re: [gnome-db] SQL Query Types



On Saturday 23 August 2003 20:08, Rodrigo Moya wrote:
> On Sat, 2003-08-23 at 16:32 +0000, Chris Silles wrote:
> > Hi,
> > Just to explain what it is I'm working on- I'm currently in the initial
> > stages of developing a PHP extension for libgda, and although progress
> > has been good so far, I've got a little issue regarding the different
> > methods of executing commands on a data source depending upon whether the
> > statement is a 'query' or 'non-query'. The problem being, I'd like to
> > implement a generic 'query' function which accepts the statement as a
> > parameter, however so far there is no clear way of deciding how to
> > execute it...
> >
> > Although the parser in libsql recognises a few types of query, there is
> > nothing to determine provider-specific statements. Should a method of
> > doing this be included it would aid tremendously the addition of
> > text-mode clients or other such scenarios where a query of unknown type
> > may be presented by the user.
> >
> > What is the feeling of the team on adding such a thing?
>
> I am not clear on what exactly you want to add. Could you ellaborate a
> bit more please?
>
> You can always execute any kind of commands using the
> gda_connection_execute_command/execute_single_command. You don't really
> need to know what kind of statement it is, unless you want to do some
> pre-processing.

This isn't the behaviour I'm experiencing with either function. Using a MySQL 
data source, both functions 'gda_connection_execute_command' and 
'gda_connection_execute_single_command' return a NULL pointer when passed a 
non-query statement, instead of a GList* or GdaDataModel* respectively.

> If it is a non-query statement, the data model returned will have 0
> columns, and the number of rows will be the number of rows affected by
> the statement, as returned by the provider.
>
> So, what is exactly what you are intending to do?
>
> cheers
>
> cheers
>
> _______________________________________________
> gnome-db-list mailing list
> gnome-db-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-db-list




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