Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import groovy.sql.Sql
- class GroovySqlExample1{
- static void main(String[] args) {
- def sql = Sql.newInstance("jdbc:postgresql://localhost:5432/sonar", "sonar",
- "sonar", "org.postgresql.Driver")
- sql.eachRow("select p.id as id, p.text_value as value, p.resource_id as resourceId, p.user_id as userId from properties p"){ row ->
- println row
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment