cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: new sql logicsheet!
Date Tue, 05 Sep 2000 13:11:43 GMT
I had this sort of problem with M$ Access that refuses getting the same
row/column more than two or three times.
The workaround was use a HashMap as a cache in front of

This behaviour is allowed by JDBC. ResultSet javadoc states "For maximum
portability, ResultSet columns within each row should be read in
left-to-right order and each column should be read only once."

The problem in esql is that you can get data in a ResultSet in a number
of different ways (get-date, get-time, get-timestamp just to mention a
few) so the cache has to be smarter. Maybe adding a cache for
getString() results would be enough for most cases ?


John Morrison a écrit :
> Donald,
> How can I do something along the lines of...
> <esql:execute-query>
>  <esql:driver>xxx</esql:driver>
>  <esql:dburl>xxx</esql:dburl>
>  <esql:username>guest</esql:username>
>  <esql:password>guest</esql:password>
>  <esql:query>SELECT ID FROM table</esql:query>
>   <esql:results>
>    <abc>
>     <id><esql:get-string column="ID"/></id>
>     <esql:execute-query>
>      <esql:query>SELECT name FROM table WHERE ID = <esql:get-string
> column="ID" ancestor="1"/></esql:query>
>       <esql:results>
>        <name><esql:get-string column="name"/></name>
>       </esql:results>
>      </esql:execute-query>
>     </abc>
>    </esql:results>
> </esql:execute-query>
> Please excuse me if some of the tags don't align.
> I know the example is a little contrived, what I'm essentially attempting to
> do is get a result from a result set twice.  JDBC doesn't like this.  What I'd
> like to know is if there's a way to get around this limitation in your taglib?
> Other than that - great piece of coding!
> John.

View raw message