Posted by: devakara on: October 17, 2008
Groovy provides very robust methods with sql instance to retrieve and manipulate the ResultSet.
There are methods for retrieving the first row, the ResultSet of some sql query, directly executing insert/update/delete queries.
Prerequisite: Obtain sql instance using
import groovy.sql.Sql
def sql = Sql.newInstance(dbpath, dbusr, dbpwd, dbdriver)
Below are some comprehensive examples which use the above sql instance.
firstRow( sqlQuery ) : This method returns the [...]
Recent Comments