Ur allows us to generate any part of XML using
<xml>{...}</xml>.
But with SQL only variable values can be specified:
SELECT ... WHERE id = {[id]}
Is is possible to extend Ur to support generation of SQL expressions?
E.g. something like
SELECT ...
ORDER BY column {if descending then DESC else ASC}
or
SELECT ...
WHERE column1 > {[val1]}
{if filtering then {AND col2 = x} else {}}
I need to make some queries which are largely the same but differs in
sorting order and/or have additional conditions. Currently I need to
copy&paste all the query and change few lines of code. Maybe there is
a better solution?
_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur