Re: [gnome-db]Re: XML Queries



Le mar, 13 fév 2001, vous avez écrit :

> > * 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, ...
>

Ok, you're rigth, it's up to the client to know what it is sending.
 
> BTW, these command types are not yet supported by all providers. We need
> to add this to them

I'll work on the Postgres one.

> 
> > 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
> 

Thanks,

Vivien




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