Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.7.5
-
None
Description
When I try to execute:
def sqlq = Sql.newInstance("jdbc:oracle:thin:@${host}:1521:${sid}", "user", "pw", "oracle.jdbc.OracleDriver") sqlq.eachRow('select * from dual where rownum<?',[2] ){ row -> println (row.getClass()) } sqlq.close()
i get:
groovy.lang.MissingMethodException: No signature of method: groovy.sql.GroovyResultSet.getClass() is applicable for argument types: () values: []
Possible solutions: getClass(), metaClass(groovy.lang.Closure), getMetaClass(), getMetaClass(), equals(java.lang.Object), getAt(java.lang.String)
Following code gives:
def sqlq = Sql.newInstance("jdbc:oracle:thin:@${host}:1521:${sid}", "user", "pw", "oracle.jdbc.OracleDriver") sqlq.eachRow('select * from dual where rownum<?',[2] ){ row -> println (row) } sqlq.close()
[DUMMY:X]
I suppose object.getClass() method calls should always work.