exceptionfactory commented on PR #10102: URL: https://github.com/apache/nifi/pull/10102#issuecomment-3114973421
> @exceptionfactory > > > ... did you consider calling `ResultSet.hasNext()` before calling `ProcessSession.commitAsync()`? > > I'm afraid this is not that simple, because `ResultSet` does not provide a way to determine if the cursor is standing at the last row. Your only option is to call `next()`, which also moves the cursor. > > https://docs.oracle.com/en/java/javase/21/docs/api/java.sql/java/sql/ResultSet.html Good point, I was thinking of an `Iterator` initially without reviewing the documentation, but what about another method like `isAfterLast()`? It can depend on the JDBC implementation, but could be an option to consider. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
