Avoid jdbc isBeforeFirst() and isAfterLast() in scrollable results calls when possible
Description
FetchingScrollableResultsImp#next() calls ResultSet#isBeforeFirst() and ResultSet#isAfterLast() in order to check if the result set is empty but the support for those jdbc methods is optional when using the default scroll mode FORWARD_ONLY. Some database drivers (db2 and derby) do not support it.
FetchingScrollableResultsImpl could theoretically avoid this calls, reducing the amount of interaction with jdbc and allowing it to work an all supported dialects without needing a specific scroll mode.
FetchingScrollableResultsImp#next()
callsResultSet#isBeforeFirst()
andResultSet#isAfterLast()
in order to check if the result set is empty but the support for those jdbc methods is optional when using the default scroll modeFORWARD_ONLY
. Some database drivers (db2 and derby) do not support it.FetchingScrollableResultsImpl
could theoretically avoid this calls, reducing the amount of interaction with jdbc and allowing it to work an all supported dialects without needing a specific scroll mode.