I would use the groovy.sql
package to do this.
import groovy.sql.GroovyRowResult
import groovy.sql.Sql
def dataSource = ctx.getBean('dataSource_Executer')
def connection = new Sql(dataSource)
def results = connection.rows('SELECT ...')
results.each { r ->
println r['columnName']
...
}
You can also access the ResultSetMetaData
as well. This blog post has a good example of how to do so.