While writing a utility script to insert images into a database I wondered if there were a groovier way of doing it. In the end settled for something along the lines of this:
def sql = Sql.newInstance(...)
// ...
Connection conn = sql.getConnection()
PreparedStatement stmt.prepareStatment(...)
stmt.setBinary(...)
stmt.executeUpate()
There must be a groovier way, can someone enlighten me?