On Fri, 1 Sep 2000, Nicola Ken Barozzi wrote:
> Hey Donald, here's a suggestion.
> Maybe it's allready here...
> Anyway, it would be nice if the SQL taglib returned also some
> info on the query constraints like
> SELECT ...... WHERE a=b
>
> could give also
> <costraints>
> <constraint>
> <name>a</name>
> <value>b</value>
> </constraint>
> </costraints>
>
> What do you think? :-)
i think i'm not going to write the SQL parsing code. tell you what - if
you want this feature, i'll take a patch for the esql logicsheet. i just
patched it so that the EsqlSession object saves the query as a string
field; all you should have to do is add a template like this:
<xsl:template match="esql:results//esql:get-query-constraints">
<constraints>
<xsp:logic>
{
// do something with _esql_session.query
while (haveMoreConstraints) {
String _esql_name = ...;
String _esql_value = ...;
<constraint>
<name><xsp:expr>_esql_name</xsp:expr></name>
<value><xsp:expr>_esql_value</xsp:expr></value>
</constraint>
}
}
</xsp:logic>
</constraints>
</xsl:template>
- donald
|