Is there a way to set connection timeout in groovy sql, also what is the default connection timeout? I checked official doc here but did not get anything. Below is my code.
private final def dev_env = [
url:"jdbc:oracle:thin:@//aguat:1521/orcl",
user:"ricky",
password:"ricky",
driver:"oracle.jdbc.OracleDriver"
]
def query="select * from emp where email=?"
def keys=["ricky@gmail.com"]
def Sql sql = Sql.newInstance(dev_env)
def results = []
sql.eachRow(query,keys){row ->
def resultMap = [:]
row.toRowResult().each {k,v-> resultMap.put(k,v) }
results << resultMap
}
Groovy version: 1.8.6
Please help