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] Updated: (DERBY-231) "FOR UPDATE" required for updatable result set to work
Date Mon, 07 Nov 2005 08:56:45 GMT
>>>>>>>>>>>> Daniel John Debrunner wrote (2005-11-04 10:29:34):
> That's the leap of faith I have trouble with. The assumption that the
> read only of the result set means read only status of the SQL query.

> 
> I see the ResultSet.CONCUR_READ_ONLY only applying to the client side
> ResultSet, because that's what it is declared to mean.
> 
> public static final int CONCUR_READ_ONLY
> 
>     The constant indicating the concurrency mode for a ResultSet object
> that may NOT be updated.
> 
> And we have instances where we know the ResultSet being read only does
> not make the SQL query read only, when the select includes the FOR
> UPDATE.

I would claim that the statement above implies that CONCUR_UPDATABLE
also only applies to the client side, and thus "FOR UPDATE" should be
required to be able to update the underlying table. And that's not
what we want (and not what this patch is implementing).

I believe that one has to view ResultSets in the context of an SQL
cursor to make sense of this. Updatability, holdability and
scrollability are issues only in a cursor context in the SQL
standards.

Well, "Leap of faith" is maybe a good description of this discussion
which is becoming kind of philosophical. Perhaps we should continue
this discussion over a beer at ApacheCon?

-- 
Bernt Marius Johnsen, Database Technology Group, 
Sun Microsystems, Trondheim, Norway

Mime
View raw message