Hello, I've done the work to expose an efficient .size() and .absolute(x) call on the QueryResults and PersistenceQuery interfaces, going all the way down to where the resultsets are created in the SQLEngine.
Anyone who is using Castor to display a "paged resultset" in a web app or otherwise will benefit a ton from this enhancement. In our case, we wanted to display a (X - Y of Z) tag at the bottom of our results on the UI. <-----------------|----------|------------------------------------> 0 X Y Z Currently, we have to call .next() X times to get to the "starting point" based on where the user is in the result set, then I have to call .next (Z-X) more times total to get the size (I could cache that, but potentially it changes between calls). so with a big resultset, that's a ton of calls. Instead of doing that work and all the excessive object creation that goes with it, I want to use JDBC 2.0 calls (absolute & last) to let the db use its internal cursors. The "cost" of doing this with cursors is not really affected by the size of the result set. Doing it using .next() eventually fails on a timeout when the resultset gets too big (roughly 700 objects for us in one case). We will need to process 10's of thousands or 100's of thousands. Anyway, the changes are running through our test cases now and they look good. The question is, since this is an enhancement, not a bug fix, will committers consider committing it? m ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev