db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mamta Satoor <ma...@Remulak.Net>
Subject Re: [VOTE][PATCH]delete from the resultset using JDBC 2.0 UpdatableResultset APIs
Date Wed, 05 Jan 2005 19:00:35 GMT

Daniel John Debrunner wrote:

> Hash: SHA1
> >>>>
> EmbedResultSet20
> - ----------------
> getConcurrency() method
>     I think this implementation is incorrect. A ResultSet that is
> created read-only, but uses a FOR UPDATE clause will return it is
> updateable. This is currently used for positioned updates.
> I think also a ResultSet that is created as updateable will change to be
> read only if the underlying language result set is not updateable. In
> this case I think a warning should be generated as well, which I don't
> think will happen with your code.

I want to make sure that I understand the right behavior of this method.

When the Statement object is created with CONCUR_READ_ONLY,
ResultSet object created on it should return CONCUR_READ_ONLY
(that is the FOR UPDATE clause should not decided the cuncurrency
of the ResultSet object).

When the Statement object is created with CONCUR_UPDATABLE, the
ResultSet object will return concurrency as CONCUR_UPDATABLE if the
underlying language result set is updateable. If the underlying language resultset
is not updatable, there should be a warning issued on the ResultSet object that this
is not an updateable ResultSet. But, what should the ResultSet object return for
concurrency in this case? I think it should return CONCUR_READ_ONLY.
And any attempts to updateable resultset apis will throw exceptions as well
since the ResultSet object is not updateable.

I will add tests to test for the concurrency of the ResultSet and
Statement objects once we have decided on the correct behavior.


View raw message