Groovy
  1. Groovy
  2. GROOVY-2859

make GroovyResultSet object printable

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6-beta-1
    • Fix Version/s: 1.5.7, 1.6-beta-2
    • Component/s: SQL processing
    • Labels:
      None

      Description

      If I try to print GroovyResultSet object, NullPointerException will be raised.

      So if groovy could convert the GroovyResultSet object into the List object whose elements are map object representing records retrieved from database when we print it, that would be great!

      currently, we have to write code as follows

      results3.info.eachRow { row ->
          println "name:${row.name}, address:${row.address}"
      }
      

      code like the following is what I expected, but will raise NPE

      println results3.info
      

      Thanks in advance.
      Daniel.Sun

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Paul King
              Reporter:
              Daniel.Sun
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development