This commit is contained in:
zyyang 2020-12-30 13:16:23 +08:00
parent 021eb5f27b
commit dda79b37d1
1 changed files with 4 additions and 2 deletions

View File

@ -115,6 +115,9 @@ public class RestfulConnection implements Connection {
@Override
public DatabaseMetaData getMetaData() throws SQLException {
if (isClosed())
throw new SQLException(CONNECTION_IS_CLOSED);
return this.metadata;
}
@ -122,8 +125,7 @@ public class RestfulConnection implements Connection {
public void setReadOnly(boolean readOnly) throws SQLException {
if (isClosed())
throw new SQLException(CONNECTION_IS_CLOSED);
if (!readOnly)
throw new SQLFeatureNotSupportedException(TSDBConstants.UNSUPPORT_METHOD_EXCEPTIONZ_MSG);
// nothing to do
}
@Override