Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.8-beta-1
-
Fix Version/s: 1.8-beta-4
-
Component/s: SQL processing
-
Labels:None
-
Testcase included:yes
-
Patch Submitted:Yes
-
Number of attachments :
Description
The patch provided adds offset and maxRows arguments to the eachRow methods. It could also be applicable for other methods, but I left it at this for now.
The implementation looks for "scrollable" results, and applies the ResultSet.absolute() method. For "forward only" result sets, next() is invoked, offset number of times. The maxRows arg is implemented by only calling ResultSet.next() maxRows number of times.
I was not able to run the tests (I have a dev mailing list thread on this topic), but I've included them in this patch. They're not all that comprehensive, but should be correct. Again, I'm not able to run these tests, but I was able to verify this implementation through other means.
I think this line:
cursorAtRow = results.absolute(offset);
should be:
cursorAtRow = results.absolute(offset - 1);
since next() will be called before the first eachRow closure invocation.