Hi Marc, You could use the map access syntax i.e. foo['id'] instead and cast/coerce the result to the appropriate type.
On Wed, Jun 22, 2016 at 1:37 PM Wilson MacGyver <[email protected]> wrote: > Hi, > > If I want to use compileStatic with groovy.sql, how would I do that? > > > the problem as far as I can tell is > > sql.eachRow("select id,.... from whatever") { foo -> > ... > foo.id > } > > returns data that is known at runtime > > but at compile time. there is no way to know that the SQL statement > returns a > id column. > > is there a way to do it? > > Thanks, > Mac > > -- > Omnem crede diem tibi diluxisse supremum. >
