Michelle Caisse wrote:
The Derby Developer's Guide states:
Rows inserted to the table may become visible in the result set.
(p. 57)
If the inserted row satisfies the query predicate, it may become
visible in the result set. (p. 58)
What does "may" mean? Are there no circumstances in which the insert
is guaranteed to become visible in the result set?
-- Michelle
Hi -
I think I found the passage you refer to but it is not on pg 57 in the
10.3 Developers guide I looked at. Please indicate the version of the
manuals or better yet, the section of the document. I found the text
you mentioned in the section "Updatable result sets".
I believe whether the row becomes visible depends on how many rows are
cached at the time the insert is performed. If the entire ResultSet is
already cached you will not see the inserted row because Derby will not
do another read from disk. If, however, you are stepping down through a
large ResultSet where all the records have not been read and the
inserted record sorts below the current position the new record could be
read from the disk when it is reached.
I don't believe there is anyway to predict this behavior.