You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Antonio Gallardo <ag...@agsoftware.dnsalias.com> on 2002/12/26 08:28:08 UTC
Change to AbstractEsqlQuery.java
Hi. I am review the code of the ESQL and a have a little change to the code:
In the source file AbstractEsqlQuery.java the original at line 207:
public void getResultRows() throws SQLException {
if (skipRows > 0) {
while (resultSet.next()) {
position++;
if (position >= skipRows) {
break;
}
}
}
}
to:
public void getResultRows() throws SQLException {
if (skipRows > 0) {
resultSet.absolute(skipRows + 1);
position += skipRows;
}
}
I think this second function must run faster than the old one.
Antonio Gallardo
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: Change to AbstractEsqlQuery.java
Posted by Torsten Curdt <tc...@dff.st>.
Antonio Gallardo wrote:
> Hi. I am review the code of the ESQL and a have a little change to the
> code:
>
> In the source file AbstractEsqlQuery.java the original at line 207:
>
> public void getResultRows() throws SQLException {
> if (skipRows > 0) {
> while (resultSet.next()) {
> position++;
> if (position >= skipRows) {
> break;
> }
> }
> }
> }
That's just the fallback method (that should never be used). If you look
into the JDBC query you'll find what you proposed :)
cheers
--
Torsten
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org