On 26-11-2021 10:10, Dmitry Yemanov wrote:
Mark et al,

Yes, I think that is perfectly acceptable for an initial version. Scrollable cursors are a bit of an oddity anyway, but having scrollable cursors in embedded access, but not in remote access is IMHO less acceptable than bad performance. As long as the performance behaviour is clearly documented, people can make the decision if the bad performance is worth the utility of scrollable cursors for themselves.

I've just committed network support for scrollable cursors to master. Prefetch logic is supported for NEXT/PRIOR navigations. Protocol changes are documented here:

Is there a way to determine at which row the cursor is currently positioned? JDBC has the ResultSet.getRow()[1] method which is documented as: "Retrieves the current row number. The first row is number 1, the second number 2, and so on."

This is not problematic when using first, next, prior, relative or absolute, but once you do fetch_last, you don't know the row number until you do a first or absolute.

The usefulness of this method is limited, but sometimes it is abused by people wanting to know how many rows there are in a result set (by requesting the last row), and if I can't fulfill this requirement, I need to at least document this.

[1]: https://docs.oracle.com/en/java/javase/17/docs/api/java.sql/java/sql/ResultSet.html#getRow()

--
Mark Rotteveel


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to