[gnome-db]Re: XML Queries



On 13 Feb 2001 10:40:45 +0100, Malerba_Vivien stna dgac fr wrote:
> Hi All!
> 
> I've not been present for quite some time on the list (home works, work on
> gASQL and a lot of work at my job mainly), and I would like to take up again.
> 
> Below is the summary of the situation as I see it today, and please correct me
> if I'm wrong on some things (probably!):
> 
> * Gerhard has produced a first working version of the XML query implementation
> which contains a new DTD (not finished yet), and a C library to convert XML
> queries to SQL. He is also now working on using XSLT rather than pure C to do
> the job.

great!

> * I have to check his work in the CVS (module libgda/lib/gda-common/xml-query)
> with some modifications in the makefiles (ASAP)
> * Pau has an awk parser to have the reverse path (from SQL to create XML) that
> is based on the old xml-query.dtd in CVS
> 
> As for the servers usage of the XML queries, I have a different view from a
> simple gda_command_execute(cmd, gda_xml_query_to_sql(xml));
> I think it should be up to the GDA server to recognize that it has XML as an
> entry (and not SQL or whatever), and convert XML to its own SQL like language
> before processing it (using the xml-query lib).
> So the command should remain gda_command_execute(cmd, xml);
> 

yes, it remains like this in the clients. In fact, this is what the
comand_type is used for. When you want to execute SQL:

cmd = gda_command_new();
recset = gda_command_execute(cmd, sql_string);

for XML:

cmd = gda_command_new();
gda_command_set_cmd_type(cmd, XML_QUERY);
recset = gda_command_execute(cmd, xml_string);

this means that the client must know what kind of command he's sending
to the provider. Or are
you talking about having the client or provider part guess what kind of
command is?

This would be a good idea, but would make things more difficult, I
think. For example, one of the command
types is TABLE, which is used to send the name of a table to the
provider, so that it returns
the equivalent to "select * from $table". Maybe it would be difficult
(slow) for the provider to check if this is a table name, and if not, if
it's a XML query, ...

BTW, these command types are not yet supported by all providers. We need
to add this to them

> One other thing I would like to see is a new call in the IDL to get from any
> GDA server either SQL (or like) from XML or XML from SQL (or like) with help
> from Pau's parser.
> 
yes, good idea. I'll add them this evening or tomorrow.


cheers





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