Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ResultSetMetaData#isReadOnly and isWritable methods #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/main/java/com/treasuredata/jdbc/TDResultSetMetaData.java
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,18 @@ public int isNullable(int column)
return ResultSetMetaData.columnNullable;
}

/*
* Indicates whether the designated column is definitely not writable.
* We support to read column only via JDBC Driver for now.
*
* @param column the first column is 1, the second is 2, etc.
* @return true if so
* @exception SQLException if a database access error occurs
*/
public boolean isReadOnly(int column)
throws SQLException
{
throw new SQLException("Method not supported");
return true;
}

public boolean isSearchable(int column)
Expand Down Expand Up @@ -280,7 +288,7 @@ else if ("float".equalsIgnoreCase(type) ||
public boolean isWritable(int column)
throws SQLException
{
throw new SQLException("Method not supported");
return !isReadOnly(column);
}

public boolean isWrapperFor(Class<?> iface)
Expand Down