Add mention that Derby supports rowUpdated, rowDeleted with a result set 
concurrency of  CONCUR_READ_ONLY
---------------------------------------------------------------------------------------------------------

                 Key: DERBY-1769
                 URL: http://issues.apache.org/jira/browse/DERBY-1769
             Project: Derby
          Issue Type: Improvement
          Components: Documentation
    Affects Versions: 10.2.1.0, 10.2.2.0, 10.3.0.0
            Reporter: Dag H. Wanvik
            Priority: Minor
             Fix For: 10.3.0.0


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.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to