Skip to content

Commit 0059c42

Browse files
committed
>Well, if it is that easy, I can do it. Patch attached and applied.
> >> On Mon, 3 Sep 2001 22:01:17 -0500, you wrote: >> public boolean isWritable(int column) throws SQLException >> { >> return !isReadOnly(column); >> } Actually, I think this change has a consequence for this method in the same class: public boolean isDefinitelyWritable(int column) throws SQLException { return isWritable(column); } This is from the JDBC spec (http://java.sun.com/j2se/1.3/docs/api/java/sql/ResultSetMetaData.html): isReadOnly() - Indicates whether the designated column is definitely not writable. isWritable() - Indicates whether it is possible for a write on the designated column to succeed. isDefinitelyWritable() - Indicates whether a write on the designated column will definitely succeed. At this time we don't really implement the fine semantics of these methods. I would suggest the following defaults: isReadOnly() false isWritable() true isDefinitelyWritable() false And that would mean that your patch is correct, but isDefinitelyWritable() would need to be patched accordingly: public boolean isDefinitelyWritable(int column) throws SQLException { return false; } Again, both in jdbc1 and jdbc2. Regards, Ren? Pijlman <rene@lab.applinet.nl>
1 parent 1fbb2d9 commit 0059c42

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/interfaces/jdbc/org/postgresql/jdbc1/ResultSetMetaData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ public boolean isWritable(int column) throws SQLException
434434
*/
435435
public boolean isDefinitelyWritable(int column) throws SQLException
436436
{
437-
return isWritable(column);
437+
return false;
438438
}
439439

440440
// ********************************************************

src/interfaces/jdbc/org/postgresql/jdbc2/ResultSetMetaData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ public boolean isWritable(int column) throws SQLException
429429
*/
430430
public boolean isDefinitelyWritable(int column) throws SQLException
431431
{
432-
return isWritable(column);
432+
return false;
433433
}
434434

435435
// ********************************************************

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy