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, unwrapequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddBatch, 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, setQueryTimeoutisWrapperFor, unwrappublic static final String ERROR_SQL
public MockStatement(Connection connection)
public MockConnection getConnection()
getConnection in interface MockStatementBasegetConnection in interface StatementgetConnection in class StatementBasepublic void setFakeConnection(MockConnection fakeConnection)
public ResultSet executeQuery(String sql) throws SQLException
executeQuery in interface StatementexecuteQuery in class StatementBaseSQLExceptionpublic int executeUpdate(String sql) throws SQLException
executeUpdate in interface StatementexecuteUpdate in class StatementBaseSQLExceptionpublic boolean execute(String sql) throws SQLException
execute in interface Statementexecute in class StatementBaseSQLExceptionCopyright © 2013–2018 Alibaba Group. All rights reserved.