Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-4622

add paging to groovy.Sql

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.8-beta-1
    • 1.8-beta-4
    • SQL processing
    • None
    • Patch

    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.

      Attachments

        Activity

          People

            paulk Paul King
            ddurham David Durham
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: