Lavalyte
9 years agoOccasional Contributor
Groovy/Java interaction
I'm new to Groovy, so I have a question.
I have a java library that does database work, with lots of methods that take a java.sql.Connection
Is it possible to get a Connection from a groovy datasource or groovy.sql.Sql object?
Hi,
Yes, I think so, Groovy SQL is just a wrapper - see createConnection on:
http://docs.groovy-lang.org/latest/html/api/groovy/sql/Sql.html
returns java.sql.Connection
Or you can of course just use plain Java to create the connection in the Groovy TestSteps etc.
Regards,
Rupert