Groovy Sql Execute Statement won't accept closures -
i have statement:
sqlinstance.execute(executestring){ dummy, reallist-> debug("real list: "+reallist) }
which fails 'invalid column type'
but:
def bool = sqlinstance.execute(executestring)
works. if print bool, prints 'true'.
for reference:
executestring = "select distinct channel_id guide_sched"
for reason, closure isn't working execute method in groovy's sql, although i've checked documentation , it's supposed to.
it looks first environment testing on ran groovy 2.4 , second runs groovy 2.1. execute statement using didn't exist until after 2.1
instead, used .rows() function return groovyrowresult parsed information needed, instead of accessing directly in .execute() closure.
Comments
Post a Comment