Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
reported by brianm - the value of 'sql' appears to be considered a property of the builder first.
#!/usr/bin/env groovy
import groovy.sql.Sql
import groovy.xml.MarkupBuilder
sql = Sql.newInstance("jdbc:postgresql://localhost/mydb?charSet=UTF-8",
"foo", "bar",
"org.postgresql.Driver")
doc = new MarkupBuilder()
doc.projects() {
sql.eachRow("select * from profiles")
}
sql.close()
println doc