This commit is contained in:
zyyang 2021-01-26 14:10:19 +08:00
parent 16069460f1
commit c96e0ea42f
1 changed files with 26 additions and 29 deletions

View File

@ -73,104 +73,101 @@ public class PreparedStatementTest {
@Test @Test
public void case004_testUnsupport() throws SQLException { public void case004_testUnsupport() throws SQLException {
TSDBPreparedStatement tsdbStatement = statement;
Assert.assertNotNull(tsdbStatement.unwrap(TSDBPreparedStatement.class)); Assert.assertNotNull(statement.unwrap(TSDBPreparedStatement.class));
Assert.assertTrue(statement.isWrapperFor(TSDBPreparedStatement.class));
try { try {
tsdbStatement.isWrapperFor(null); statement.getMaxFieldSize();
} catch (SQLException e) { } catch (SQLException e) {
} }
try { try {
tsdbStatement.getMaxFieldSize(); statement.setMaxFieldSize(0);
} catch (SQLException e) { } catch (SQLException e) {
} }
try { try {
tsdbStatement.setMaxFieldSize(0); statement.setEscapeProcessing(true);
} catch (SQLException e) { } catch (SQLException e) {
} }
try { try {
tsdbStatement.setEscapeProcessing(true); statement.cancel();
} catch (SQLException e) { } catch (SQLException e) {
} }
try { try {
tsdbStatement.cancel(); statement.getWarnings();
} catch (SQLException e) { } catch (SQLException e) {
} }
try { try {
tsdbStatement.getWarnings(); statement.clearWarnings();
} catch (SQLException e) { } catch (SQLException e) {
} }
try { try {
tsdbStatement.clearWarnings(); statement.setCursorName(null);
} catch (SQLException e) { } catch (SQLException e) {
} }
try { try {
tsdbStatement.setCursorName(null); statement.getMoreResults();
} catch (SQLException e) { } catch (SQLException e) {
} }
try { try {
tsdbStatement.getMoreResults(); statement.setFetchDirection(0);
} catch (SQLException e) { } catch (SQLException e) {
} }
try { try {
tsdbStatement.setFetchDirection(0); statement.getFetchDirection();
} catch (SQLException e) { } catch (SQLException e) {
} }
try { try {
tsdbStatement.getFetchDirection(); statement.getResultSetConcurrency();
} catch (SQLException e) { } catch (SQLException e) {
} }
try { try {
tsdbStatement.getResultSetConcurrency(); statement.getResultSetType();
} catch (SQLException e) { } catch (SQLException e) {
} }
try { try {
tsdbStatement.getResultSetType(); statement.getConnection();
} catch (SQLException e) { } catch (SQLException e) {
} }
try { try {
tsdbStatement.getConnection(); statement.getMoreResults();
} catch (SQLException e) { } catch (SQLException e) {
} }
try { try {
tsdbStatement.getMoreResults(); statement.getGeneratedKeys();
} catch (SQLException e) { } catch (SQLException e) {
} }
try { try {
tsdbStatement.getGeneratedKeys(); statement.executeUpdate(null, 0);
} catch (SQLException e) { } catch (SQLException e) {
} }
try { try {
tsdbStatement.executeUpdate(null, 0); statement.executeUpdate(null, new int[]{0});
} catch (SQLException e) { } catch (SQLException e) {
} }
try { try {
tsdbStatement.executeUpdate(null, new int[]{0}); statement.executeUpdate(null, new String[]{"str1", "str2"});
} catch (SQLException e) { } catch (SQLException e) {
} }
try { try {
tsdbStatement.executeUpdate(null, new String[]{"str1", "str2"}); statement.getResultSetHoldability();
} catch (SQLException e) { } catch (SQLException e) {
} }
try { try {
tsdbStatement.getResultSetHoldability(); statement.setPoolable(true);
} catch (SQLException e) { } catch (SQLException e) {
} }
try { try {
tsdbStatement.setPoolable(true); statement.isPoolable();
} catch (SQLException e) { } catch (SQLException e) {
} }
try { try {
tsdbStatement.isPoolable(); statement.closeOnCompletion();
} catch (SQLException e) {
}
try {
tsdbStatement.closeOnCompletion();
} catch (SQLException e) { } catch (SQLException e) {
} }
try { try {
tsdbStatement.isCloseOnCompletion(); statement.isCloseOnCompletion();
} catch (SQLException e) { } catch (SQLException e) {
} }
} }