...
| Code Block |
|---|
import groovy.sql.Sql
def sql = Sql.newInstance("jdbc:mysql://localhost:3306/mydb", "user",
"pswd", "com.mysql.jdbc.Driver")
def food = sql.dataSet('FOOD')
def cheesecheeses = food.findAll { it.type == 'cheese' }
cheesecheeses.each { println "Eat ${it.name}" }
|
...