jaybird icon indicating copy to clipboard operation
jaybird copied to clipboard

Change handling of TYPE_FORWARD_ONLY with HOLD_CURSORS_OVER_COMMIT

Open mrotteveel opened this issue 10 months ago • 1 comments

Currently, when a TYPE_FORWARD_ONLY is requested with HOLD_CURSORS_OVER_COMMIT, the result set is "upgraded" to TYPE_SCROLL_INSENSITIVE and a warning is registered. This upgrade is done because when using TYPE_SCROLL_INSENSITIVE, the entire result set is cached, so the result set is materialized immediately.

There are basically two alternatives:

  1. (complex) if one or more result sets are HOLD_CURSORS_OVER_COMMIT, use commit/rollback retain and only really commit or rollback after all holdable result sets are closed.

  2. (simple, quick&dirty) keep the current inner-workings that materialize the result set immediately, but wrap it so that it still behaves as a TYPE_FORWARD_ONLY (or use the existing forwardOnly parameter, which is used for "cached" result sets), removing the need for registering the upgrade warning.

mrotteveel avatar Apr 10 '24 11:04 mrotteveel

Alternative option: add a connection property and/or system property to suppress/ignore JDBC warnings

mrotteveel avatar May 05 '24 11:05 mrotteveel