db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernt M. Johnsen" <Bernt.John...@Sun.COM>
Subject Re: [jira] Commented: (DERBY-690) Add scrollable, updatable, insensitive result sets
Date Wed, 01 Mar 2006 12:54:47 GMT
>>>>>>>>>>>> Dag H. Wanvik (JIRA) wrote (2006-02-27 15:44:44):
>     [ http://issues.apache.org/jira/browse/DERBY-690?page=comments#action_12367960 ]

> Dag H. Wanvik commented on DERBY-690:
> -------------------------------------
> I checked how the trigger situation is handled in Oracle, since they
> do support Scrollable updatable insensitive result sets. In essence
> they take that approach that:
>      - refreshRow will update the result set with the values of the
>        underlying database, even for insensitive result sets.

The API (1.4.2) spec of refreshRow states:

   All values are refetched subject to the transaction isolation level
   and cursor sensitivity. 

Hence there is a difference in behaviour wrt sensitivity. This can
only imply that refreshRow is a null-operation for insensitive
resultsets. This is also in agreement with the tutorial as others had
pointed out(See refreshRow on page 759).

We should also strive to make "insensitivity" as close to the SQL
defintion as possible (SQL 2003 p. 96):

   A change to SQL-data is said to be independent of a cursor CR if
   and only if it is not made by an <update statement: positioned> or a
   <delete statement: positioned> that is positioned on CR.

   A change to SQL-data is said to be significant to CR if and only if
   it is independent of CR, and, had it been committed before CR was
   opened, would have caused the table associated with the cursor to
   be different in any respect.

   A change to SQL-data is said to be visible to CR if and only if it
   has an effect on CR by inserting a row in CR, deleting a row from
   CR, changing the value of a column of a row of CR, or reordering
   the rows of CR.


   - If the cursor is insensitive, then significant changes are not visible.

Bernt Marius Johnsen, Database Technology Group, 
Staff Engineer, Technical Lead Derby/Java DB
Sun Microsystems, Trondheim, Norway

View raw message