Package com.alibaba.druid.mock
Class MockStatement
java.lang.Object
com.alibaba.druid.util.jdbc.StatementBase
com.alibaba.druid.mock.MockStatement
- All Implemented Interfaces:
MockStatementBase,AutoCloseable,Statement,Wrapper
-
Field Summary
FieldsFields inherited from class com.alibaba.druid.util.jdbc.StatementBase
closed, generatedKeys, resultSetFields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbooleanexecuteQuery(String sql) intexecuteUpdate(String sql) voidsetFakeConnection(MockConnection fakeConnection) 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, unwrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.sql.Statement
addBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, 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, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeoutMethods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Field Details
-
ERROR_SQL
- See Also:
-
mockConnection
-
-
Constructor Details
-
MockStatement
-
-
Method Details
-
checkOpen
- Overrides:
checkOpenin classStatementBase- Throws:
SQLException
-
getConnection
- Specified by:
getConnectionin interfaceMockStatementBase- Specified by:
getConnectionin interfaceStatement- Overrides:
getConnectionin classStatementBase
-
setFakeConnection
-
executeQuery
- Specified by:
executeQueryin interfaceStatement- Overrides:
executeQueryin classStatementBase- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classStatementBase- Throws:
SQLException
-
execute
- Specified by:
executein interfaceStatement- Overrides:
executein classStatementBase- Throws:
SQLException
-