cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luís Góis <>
Subject ESQL : No, my problem isn't with mutual exclusivity
Date Tue, 24 Jul 2001 00:53:07 GMT
Hello again Torsten,

if my query didn't return any row, a call to the execute() method
returns false, right?
Therefore, for a no-results situation, the code resulting from the
of the esql:no-results template is never reached -  this is what I
understand from reading
the java code below. Am I right?! I guess it's highly probable that I'm
grossly wrong,
but this is the only place in the esql.xsl file where the template is

I don't wan't to execute java code when I do an update or insert, but
when my
"SELECT title FROM test WHERE title = 'a title' " query returns no rows
- for this 3
situations, the execute() method's will return false and not a ResultSet

What am I missing?!?!?

Conclusion : I need mutual exclusivity between 'no-results' and
'update-results' (mutual
exclusivity between 'no-results' and 'results' is assured by the
true/false return values of the
execute() method).

Thanks for your attention. I really must solve this (i could just edit
esql.xsl to "correct"
this, but I wan't to really make sure this is what I have to do).

esql taglib v1.86
<<line 503>>
      if (_esql_query.results) {
        do {
          _esql_query.resultset = _esql_query.statement.getResultSet();
          _esql_query.resultset_metadata =
          _esql_query.position = 0;
          if (_esql_connection.use_limit_clause == 0 &amp;&amp;
_esql_query.skip_rows &gt; 0) {
            while ( {
              if (_esql_query.position == _esql_query.skip_rows) {

          if ( {
            <xsl:apply-templates select="esql:results"/>
          else {
            <xsl:apply-templates select="esql:no-results"/>

        } while(_esql_query.statement.getMoreResults());
      } else {
        _esql_query.position = _esql_query.statement.getUpdateCount();
        if (_esql_query.position &gt;= 0) {
          <xsl:apply-templates select="esql:update-results/*"/>

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message