You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Torsten Curdt <tc...@dff.st> on 2001/07/23 19:46:41 UTC

[c2][patch] RE: ESQL : No, my problem isn't with mutual exclusivity

> Hello again Torsten,
> 
> if my query didn't return any row, a call to the execute() method
> returns false, right?

No that's wrong. Is tells you if you got at least one ResultSet _object_
not if this ResultSet contains a row at all!

> Therefore, for a no-results situation, the code resulting from the
> application
> 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
> apllied.
> 
> 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
> Object.
> 
> 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).

Ok... got you! Patch is attached :)
Thanks for the reporting...
--
Torsten