Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
10.2.1.6, 10.2.2.0, 10.3.1.4
-
None
-
Normal
Description
We should add a note on the behavior on the rowXXX methods in
java.sql.ResultSet, since they now (as of JDBC 4.0) have an optional
feature.
Cf this "Note:" for rowDeleted in JDBC4 API:
> boolean rowDeleted() throws SQLException
>
> Retrieves whether a row has been deleted. A deleted row may leave a
> visible "hole" in a result set. This method can be used to detect
> holes in a result set. The value returned depends on whether or not
> this ResultSet object can detect deletions.
>
> Note: Support for the rowDeleted method is optional with a result set
> concurrency of CONCUR_READ_ONLY
>
> Returns:
> true if the current row is detected to have been deleted
> by the owner or another; false otherwise
> Throws:
> SQLException - if a database access error occurs or this
> method is called on a closed result set
>
> SQLFeatureNotSupportedException - if the JDBC driver does
> not support this method
> Since:
> 1.2
> See Also:
> DatabaseMetaData.deletesAreDetected(int)
For updatable result sets, Derby supports calling the methods
rowDeleted, rowUpdated and rowInserted even if the RS had concurrency
CONCUR_READ_ONLY. If the query's underlying result set if scrollable
and updatable, rowUpdated and rowDeleted can be used to detect if
changes were made using positioned UPDATE/DELETEs, since positioned
modifications are seen by the result set in Derby. Normally, though,
such usage is not recommended. If updates are required, the RS should
have concurrency CONCUR_UPDATABLE.
rowInserted will always return false, since Derby does not detect
inserts.
Attachments
Attachments
Issue Links
- is related to
-
DERBY-1744 ResultSet.rowInserted(), rowUpdated() and rowDeleted() don't throw exception on read-only result sets
- Closed