Reputation: 838
I have a Stored Procedure that returns a VARCHAR OUT and a Cursor. The rows is always null and I need the result set in it. How do I get it? I get the OUT value in iStatus as expected.
def rows = sql.call stmt, parameters, { it ->
iStatus = it
}
Upvotes: 1
Views: 998
Reputation: 4612
You are probably looking for Sql#callWithRows() or Sql#callWithAllRows().
There are two variations for each of the methods. One with GString
and the other with List
of parameters.
It's quite new feature though so you may need to update Groovy version.
Upvotes: 1