Vinodh Thiagarajan
Vinodh Thiagarajan

Reputation: 838

Call stored procedure in groovy and retrieve the OUT parameter and Cursor

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

Answers (1)

topr
topr

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

Related Questions