cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Irv Salisbury III <>
Subject SQLTransformer modifications
Date Wed, 05 Mar 2003 17:15:11 GMT
We'd like to use paging in our application from the result sets returned 
from the SQLTransformer.  However, with a number of our queries 
returning 20,000+ rows, it seems like the current Paginator will not cut 
it for us.  This is mainly because it looks like the Paginator expects 
all of the data to be there, which we don't want it to be.

What we'd like to do is to take advantage of the setFetchSize() stuff in 
the Statement object, and the fact that the drivers we are using 
implement this properly.  So, in essence, the driver will only go and 
get the number of rows we want, and when we go past that number of rows, 
it will go and fetch N number more.  To do this, we have to do our 
paginating by using the ResultSet directly.

I have been wrestling with this and looking at the code for 
SQLTransformer to see if I could extend it to do this.  Basically, set 
the fetch size on the Statement object before querying.  I also then 
need to put the ResultSet object into my session so I can retrieve it 
with my paginating transformer.  Upon looking at this, it doesn't seem 
like there is a good way to tap into the SQLTransformer to do this.  It 
seems like another alternative would be to just copy the source code for 
SQLTransformer and tap in where I need to.  Seems pretty nasty, but 
would get me where I want to go.

So, I'd love feedback on this, as well as any thoughts from people that 
might have tackled this before.


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

View raw message