db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "RPost" <rp0...@pacbell.net>
Subject Re: Position of the ResultSet after updateRow?
Date Tue, 04 Jan 2005 19:44:39 GMT
Would the methods: ownUpdatesAreVisible, ownDeletesAreVisible, and
ownInsertsAreVisible have applicability?

Chapter 14.2.4.1 of page 122 of the JDBC 3.0 spec has this:

The method DatabaseMetaData.ownUpdatesAreVisible(int type) returns
true if a ResultSet object of the specified type is able to see its own
updates and

false otherwise.

The JDBC 2.0 API guide at
http://library.n0i.net/programming/java/ja-jdk12/guide/jdbc/spec2/jdbc2.0.frame.html
section 5.8.3 also seems to say that these methods need to be used to know
what's what.

----- Original Message ----- 
From: "Daniel John Debrunner" <djd@debrunners.com>
To: "Derby Development" <derby-dev@db.apache.org>
Sent: Tuesday, January 04, 2005 10:29 AM
Subject: Re: Position of the ResultSet after updateRow?


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Mamta Satoor wrote:
>
> > Hi,
> >
> > Some of you might recall the discussion on where the ResultSet should be
> > positioned after deleteRow and the conclusion that it will be placed
right
> > before the next row in the ResultSet.
> >
> > My question is about ResultSet position after updateRow. An updateRow
> > can make the row not qualify for the original select query.
>
> Can anyone from the Sun JDBC team comment on how updateRow() and
> insertRow() are intended to behave when they modify or create rows that
> would not qualify according to the SQL query that created the ResultSet?
>
> Reading between the lines in the JDBC book seems to imply that the
> updated or inserted row are always part of the ResultSet, even though a
> subsequent execution would not return that row.
> I can see this approach makes sense for going through a list of items in
> an application. Say all items with a price <= 10.0, and modifying the
> price of some to be > 10.0, as a user I might expect to see the newly
> modified row remain in my view, rather than just disappear.
>
> Dan.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.5 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFB2uCmIv0S4qsbfuQRAtagAJwOkXd7mu0nLteBa26X4tqGY324RgCdE8ld
> BXWcUymBmC0cK0Yh9dwPE84=
> =YSr2
> -----END PGP SIGNATURE-----
>


Mime
View raw message