Skip to content

Instantly share code, notes, and snippets.

@jezinka

jezinka/fancyFunction.groovy Secret

Last active Mar 31, 2019
Embed
What would you like to do?
def dataSource
String fancyFunction(String jsonInput) {
String result = ''
Clob jsonInput = dataSource.getConnection().createClob()
clob.setString(1, jsonInput)
try {
new Sql(dataSource).call("{? = call pkg.fancy_procedure_input_output_clob(in_json => ?)}",
[Sql.CLOB,
clob])
{ jsonOutput -> result = jsonOutput?.characterStream?.text }
} catch (SQLException ex) {
log.error('Error during executing fancy procedure: ', ex)
}
return result
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment