Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
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
-
Number of attachments :
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
- is related to
-
GROOVY-2587
Strange bugs with GroovyResultSet
-
When I executed the following code:
println results3.info.getClass() // results3.info is a GroovyResultSet objectMissingMethodException occurred:
Caught: groovy.lang.MissingMethodException: No signature of method: groovy.sql.GroovyResultSet.getCl ass() is applicable for argument types: () values: {}I'm using groovy downloaded from http://build.canoo.com/groovy/artifacts//20080523211725