提交 dda79b37 编写于 作者: Z zyyang

change

上级 021eb5f2
...@@ -115,6 +115,9 @@ public class RestfulConnection implements Connection { ...@@ -115,6 +115,9 @@ public class RestfulConnection implements Connection {
@Override @Override
public DatabaseMetaData getMetaData() throws SQLException { public DatabaseMetaData getMetaData() throws SQLException {
if (isClosed())
throw new SQLException(CONNECTION_IS_CLOSED);
return this.metadata; return this.metadata;
} }
...@@ -122,8 +125,7 @@ public class RestfulConnection implements Connection { ...@@ -122,8 +125,7 @@ public class RestfulConnection implements Connection {
public void setReadOnly(boolean readOnly) throws SQLException { public void setReadOnly(boolean readOnly) throws SQLException {
if (isClosed()) if (isClosed())
throw new SQLException(CONNECTION_IS_CLOSED); throw new SQLException(CONNECTION_IS_CLOSED);
if (!readOnly) // nothing to do
throw new SQLFeatureNotSupportedException(TSDBConstants.UNSUPPORT_METHOD_EXCEPTIONZ_MSG);
} }
@Override @Override
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册