提交 67ad9c50 编写于 作者: Z zyyang

change

上级 bf8ae909
...@@ -349,7 +349,7 @@ public abstract class AbstractResultSet extends WrapperImpl implements ResultSet ...@@ -349,7 +349,7 @@ public abstract class AbstractResultSet extends WrapperImpl implements ResultSet
if (isClosed()) if (isClosed())
throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_STATEMENT_CLOSED); throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_STATEMENT_CLOSED);
return false; throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_UNSUPPORTED_METHOD);
} }
@Override @Override
...@@ -357,7 +357,7 @@ public abstract class AbstractResultSet extends WrapperImpl implements ResultSet ...@@ -357,7 +357,7 @@ public abstract class AbstractResultSet extends WrapperImpl implements ResultSet
if (isClosed()) if (isClosed())
throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_STATEMENT_CLOSED); throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_STATEMENT_CLOSED);
return false; throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_UNSUPPORTED_METHOD);
} }
@Override @Override
...@@ -365,7 +365,7 @@ public abstract class AbstractResultSet extends WrapperImpl implements ResultSet ...@@ -365,7 +365,7 @@ public abstract class AbstractResultSet extends WrapperImpl implements ResultSet
if (isClosed()) if (isClosed())
throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_STATEMENT_CLOSED); throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_STATEMENT_CLOSED);
return false; throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_UNSUPPORTED_METHOD);
} }
@Override @Override
......
...@@ -259,10 +259,12 @@ public class RestfulResultSetTest { ...@@ -259,10 +259,12 @@ public class RestfulResultSetTest {
rs.previous(); rs.previous();
} }
@Test(expected = SQLException.class) @Test
public void setFetchDirection() throws SQLException { public void setFetchDirection() throws SQLException {
rs.setFetchDirection(ResultSet.FETCH_FORWARD); rs.setFetchDirection(ResultSet.FETCH_FORWARD);
Assert.assertEquals(ResultSet.FETCH_FORWARD, rs.getFetchDirection());
rs.setFetchDirection(ResultSet.FETCH_UNKNOWN); rs.setFetchDirection(ResultSet.FETCH_UNKNOWN);
Assert.assertEquals(ResultSet.FETCH_FORWARD, rs.getFetchDirection());
} }
@Test @Test
...@@ -270,14 +272,15 @@ public class RestfulResultSetTest { ...@@ -270,14 +272,15 @@ public class RestfulResultSetTest {
Assert.assertEquals(ResultSet.FETCH_FORWARD, rs.getFetchDirection()); Assert.assertEquals(ResultSet.FETCH_FORWARD, rs.getFetchDirection());
} }
@Test(expected = SQLException.class) @Test
public void setFetchSize() throws SQLException { public void setFetchSize() throws SQLException {
rs.setFetchSize(0); rs.setFetchSize(0);
Assert.assertEquals(0, rs.getFetchSize());
} }
@Test @Test
public void getFetchSize() throws SQLException { public void getFetchSize() throws SQLException {
Assert.assertEquals(1, rs.getFetchSize()); Assert.assertEquals(0, rs.getFetchSize());
} }
@Test @Test
...@@ -528,7 +531,10 @@ public class RestfulResultSetTest { ...@@ -528,7 +531,10 @@ public class RestfulResultSetTest {
@Test(expected = SQLFeatureNotSupportedException.class) @Test(expected = SQLFeatureNotSupportedException.class)
public void getNString() throws SQLException { public void getNString() throws SQLException {
rs.getNString("f1"); String f10 = rs.getNString("f10");
Assert.assertEquals("涛思数据", f10);
f10 = rs.getNString(10);
Assert.assertEquals("涛思数据", f10);
} }
@Test(expected = SQLFeatureNotSupportedException.class) @Test(expected = SQLFeatureNotSupportedException.class)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册