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

make GroovyResultSet object printable

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6-beta-1
    • 1.5.7, 1.6-beta-2
    • SQL processing
    • 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

      Attachments

        Issue Links

          Activity

            People

              paulk Paul King
              daniel_sun Daniel Sun
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: