com.alibaba.druid.mock
Class MockStatement
java.lang.Object
com.alibaba.druid.util.jdbc.StatementBase
com.alibaba.druid.mock.MockStatement
- All Implemented Interfaces:
- MockStatementBase, Statement, Wrapper
public class MockStatement
- extends StatementBase
- implements MockStatementBase, Statement
| Methods inherited from class com.alibaba.druid.util.jdbc.StatementBase |
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 |
| Methods inherited from interface java.sql.Statement |
addBatch, cancel, clearBatch, clearWarnings, close, execute, execute, execute, executeBatch, executeUpdate, executeUpdate, executeUpdate, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout |
ERROR_SQL
public static final String ERROR_SQL
- See Also:
- Constant Field Values
MockStatement
public MockStatement(Connection connection)
getConnection
public MockConnection getConnection()
- Specified by:
getConnection in interface MockStatementBase- Specified by:
getConnection in interface Statement- Overrides:
getConnection in class StatementBase
setFakeConnection
public void setFakeConnection(MockConnection fakeConnection)
executeQuery
public ResultSet executeQuery(String sql)
throws SQLException
- Specified by:
executeQuery in interface Statement- Overrides:
executeQuery in class StatementBase
- Throws:
SQLException
executeUpdate
public int executeUpdate(String sql)
throws SQLException
- Specified by:
executeUpdate in interface Statement- Overrides:
executeUpdate in class StatementBase
- Throws:
SQLException
execute
public boolean execute(String sql)
throws SQLException
- Specified by:
execute in interface Statement- Overrides:
execute in class StatementBase
- Throws:
SQLException
Copyright © 2012 Alibaba Group. All Rights Reserved.