Re: Generating SQL statements in BL

"[email protected]" <[email protected]> Mon, 12 Oct 2009 20:24:25 +0200
Newsgroups gmane.comp.cms.xaraya.devel
Organization Xaraya
Message-ID <[email protected]>
mikespub wrote:
> [email protected] wrote:
>> Use case: extending the getitems tag in DD, say for more versatile 
>> WHERE clauses:
>>
>> <xar:data-getitems......>
>>   <where>
>>     <property name="foo">27</property>
>>   </where>
>> </getitems>
>>
>> Obviously the above is just an example (and a simplified one at that). 
>> This basically comes out to generating SQL statements from XML. I'm 
>> wondering whether there is anything out there that could be adopted, 
>> in terms of XML schemas that represent SQL statements.
>> I've been trolling around but haven't really found anything much. 
>> Since this idea presumably is not new, can anyone point me to where I 
>> might find something along these lines?
>>
>> Thanks,
>> Marc
> 
> Most of the work on XML + SQL seems to be dealing with totally different
> matters than SQL query statements, 

Presumably that's why I'm not having much luck. there is a flurry of 
interest in the other direction, i.e. SQL outputing XML, which may make 
it harder to find what I'm looking for

so I would focus on plain XML parsing
> here - if that's what you want to do :-)

Perhaps it's not as obvious as I assume: I am looking for ways to 
enhance DD's data retrieval capability at the tag level, which is to say 
dynamically. The current capability of adding attributes what, startnum, 
  sort and such should be more rigorously defined or perhaps replaced 
with something semantically more powerful.

Essentially what is called for is a way of transforming something that 
can be put in the templates one-to-one into executable SQL statements.

The tableddl scenario goes a step in this direction, but it is limited 
to the CREATE statements that create a Xaraya installation. This idea 
would allow us to generalize the approach in that scenario.

Marc