The below snippet results in
"org.postgresql.jdbc4.Jdbc4Array.getArrayImpl(long,int,Map) is not yet
implemented." Does anyone know how to iterate
http://jdbc.postgresql.org/development/privateapi/org/postgresql/jdbc4/Jdbc4Array.html
 ?

{{groovy}}
println "|=Firewalled|=Port|=Protocol|=Service|=Application|=Description"

import groovy.sql.Sql
sql = Sql.newInstance( 'jdbc:postgresql:machine_info?user=machine_info' )
sql.eachRow( 'select * from network_service' ) {
  if(it.firewalled) {
    firewalled="Yes"
  } else {
    firewalled="No"
  }

  p=""
  for(proto in it.protocols.getArray(null)) {
    p+=proto + ","
  }

  println
"|$firewalled|$it.port|$p|$it.service|$it.application|$it.description"
}
{{/groovy}}
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to