public class MockStatement extends StatementBase implements MockStatementBase, Statement
Modifier and Type | Field and Description |
---|---|
static String |
ERROR_SQL |
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
Constructor and Description |
---|
MockStatement(Connection connection) |
Modifier and Type | Method and Description |
---|---|
boolean |
execute(String sql) |
ResultSet |
executeQuery(String sql) |
int |
executeUpdate(String sql) |
MockConnection |
getConnection() |
void |
setFakeConnection(MockConnection fakeConnection) |
addBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, execute, execute, execute, executeBatch, executeUpdate, executeUpdate, executeUpdate, getCursorName, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isEscapeProcessing, isPoolable, isWrapperFor, setConnection, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setGeneratedKeys, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, setResultSet, setResultSetConcurrency, setResultSetHoldability, setResultSetType, setUpdateCount, setWarning, setWarnings, unwrap
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeUpdate, executeUpdate, executeUpdate, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout
isWrapperFor, unwrap
public static final String ERROR_SQL
public MockStatement(Connection connection)
public MockConnection getConnection()
getConnection
in interface MockStatementBase
getConnection
in interface Statement
getConnection
in class StatementBase
public void setFakeConnection(MockConnection fakeConnection)
public ResultSet executeQuery(String sql) throws SQLException
executeQuery
in interface Statement
executeQuery
in class StatementBase
SQLException
public int executeUpdate(String sql) throws SQLException
executeUpdate
in interface Statement
executeUpdate
in class StatementBase
SQLException
public boolean execute(String sql) throws SQLException
execute
in interface Statement
execute
in class StatementBase
SQLException
Copyright © 2013–2017 Alibaba Group. All rights reserved.