Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This branch adds support for REF CURSOR results from PL/SQL. A new REF_CURSOR constant in OracleR2dbcTypes allows out parameters to be registered for this type. Readable.get(...) methods allow REF CURSOR values to be mapped to Result objects. The rows of a REF CURSOR may then be consumed by calling Result.map(*) methods or Result.flatMap(...).
Oracle R2DBC uses Oracle JDBC statements to execute PL/SQL. When Oracle R2DBC returns a Result that is backed by a JDBC ResultSet, the JDBC statement must be held open until that ResultSet is consumed (b/c closing a JDBC statement closes the ResultSet). A solution for this was present in the current code base, but the design was broken by REF CURSORS. The design assumed that, before any Result was emitted to user code, all ResultSets would could be accounted. With REF CURSORS, new ResultSets can be created after Results are emitted.
The new constraint is that Oracle R2DBC doesn't know how many ResultSets will exist until user code executes a row mapping function. To handle this case, a new DependentCounter object is added. This object allows the number of ResultSets that depend on the JDBC statement to increase after Results are emitted to user code.