Project: mule
Issue MULE-7391: Simplify stored procedure results processing
Current stored procedure message processor returns an iterator of statements results (resultset, output params, etc). The reason of that is that we don't know in advance how many results we are going to obtain from a statement and that many DB cannot maintain multiple open resultsets. That makes us unable to process resultSets in streaming mode. The problem is that this makes complex to process result both in streaming on/off modes. The proposed improvement is to return different results depending on whether streaming is enabled or not. * Streaming false Maps of results ResultSet (resultset1, resultset2..) List of maps UpdateCount (updateCount1,.....) integer Output parameter (the name of the parameter) value will result value of the param Map "resultSet1" -> resultSet "updateCount1" -> updateCount * Streaming true Iterator of results ResultSet (resultset1, resultset2..) iterator of maps UpdateCount (updateCount1,.....) integer Output parameter (the name of the parameter) value will result value of the param iterator.next -> resultset iterator.next -> updateCount With this change we loose some consistency because the result changes depending on the value of an attribute, but we gain on simplicity of use for the normal case.
Story points: 5