You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FETCH_REVERSE and FETCH_UNKNOWN are now always allowed on statement, and inherited by the result set. FETCH_REVERSE and FETCH_UNKNOWN are now allowed to be set on a scrollable result set.
The JDBC spec is a bit ambiguous about it, so setting FETCH_REVERSE and FETCH_UNKNOWN is allowed on a non-scrollable statement, and will be inherited as such by the non-scrollable result set, but setting that same value explicitly on a non-scrollable result set itself is not allowed and will throw an exception. This is similar to what the PostgreSQL JDBC driver does.
We ignore the hint entirely.
As part of this changed, calling get/setFetchDirection on a closed statement or closed result set will always result in an SQLException (this was done inconsistently).
Submitted by: @mrotteveel
Statement + ResultSet setFetchDirection should ignore FETCH_REVERSE and FETCH_UNKNOWN instead of throwing an exception
See also section 13.5 of JDBC 4.2:
"Hints provided to the driver via this interface may be ignored by the driver if they are not appropriate."
Commits: c6c78da
The text was updated successfully, but these errors were encountered: