Package com.alibaba.druid.util.jdbc
Class StatementBase
java.lang.Object
com.alibaba.druid.util.jdbc.StatementBase
- All Implemented Interfaces:
AutoCloseable,Statement,Wrapper
- Direct Known Subclasses:
MockStatement,PreparedStatementBase
-
Field Summary
FieldsFields 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 TypeMethodDescriptionvoidvoidcancel()protected voidvoidvoidvoidclose()voidbooleanbooleanbooleanbooleanint[]executeQuery(String sql) intexecuteUpdate(String sql) intexecuteUpdate(String sql, int autoGeneratedKeys) intexecuteUpdate(String sql, int[] columnIndexes) intexecuteUpdate(String sql, String[] columnNames) intintintintbooleanbooleangetMoreResults(int current) intintintintintbooleanisClosed()booleanbooleanbooleanbooleanisWrapperFor(Class<?> iface) voidsetConnection(Connection connection) voidsetCursorName(String name) voidsetEscapeProcessing(boolean enable) voidsetFetchDirection(int direction) voidsetFetchSize(int rows) voidsetGeneratedKeys(ResultSet generatedKeys) voidsetMaxFieldSize(int max) voidsetMaxRows(int max) voidsetPoolable(boolean poolable) voidsetQueryTimeout(int seconds) voidsetResultSet(ResultSet resultSet) voidsetResultSetConcurrency(int resultSetConcurrency) voidsetResultSetHoldability(int resultSetHoldability) voidsetResultSetType(int resultType) voidsetUpdateCount(int updateCount) voidsetWarning(SQLWarning warning) voidsetWarnings(SQLWarning warnings) <T> TMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.sql.Statement
enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, isSimpleIdentifier, setLargeMaxRows
-
Field Details
-
closed
protected boolean closed -
generatedKeys
-
resultSet
-
-
Constructor Details
-
StatementBase
-
-
Method Details
-
getConnection
- Specified by:
getConnectionin interfaceStatement- Throws:
SQLException
-
setConnection
-
checkOpen
- Throws:
SQLException
-
setFetchDirection
- Specified by:
setFetchDirectionin interfaceStatement- Throws:
SQLException
-
getFetchDirection
- Specified by:
getFetchDirectionin interfaceStatement- Throws:
SQLException
-
setFetchSize
- Specified by:
setFetchSizein interfaceStatement- Throws:
SQLException
-
getFetchSize
- Specified by:
getFetchSizein interfaceStatement- Throws:
SQLException
-
getResultSetType
- Specified by:
getResultSetTypein interfaceStatement- Throws:
SQLException
-
setResultSetType
public void setResultSetType(int resultType) -
setResultSetConcurrency
public void setResultSetConcurrency(int resultSetConcurrency) -
getResultSetConcurrency
- Specified by:
getResultSetConcurrencyin interfaceStatement- Throws:
SQLException
-
getResultSetHoldability
- Specified by:
getResultSetHoldabilityin interfaceStatement- Throws:
SQLException
-
setResultSetHoldability
public void setResultSetHoldability(int resultSetHoldability) -
getMaxFieldSize
- Specified by:
getMaxFieldSizein interfaceStatement- Throws:
SQLException
-
setMaxFieldSize
- Specified by:
setMaxFieldSizein interfaceStatement- Throws:
SQLException
-
getMaxRows
- Specified by:
getMaxRowsin interfaceStatement- Throws:
SQLException
-
setMaxRows
- Specified by:
setMaxRowsin interfaceStatement- Throws:
SQLException
-
setEscapeProcessing
- Specified by:
setEscapeProcessingin interfaceStatement- Throws:
SQLException
-
isEscapeProcessing
public boolean isEscapeProcessing() -
getQueryTimeout
- Specified by:
getQueryTimeoutin interfaceStatement- Throws:
SQLException
-
setQueryTimeout
- Specified by:
setQueryTimeoutin interfaceStatement- Throws:
SQLException
-
setCursorName
- Specified by:
setCursorNamein interfaceStatement- Throws:
SQLException
-
getCursorName
-
getWarnings
- Specified by:
getWarningsin interfaceStatement- Throws:
SQLException
-
clearWarnings
- Specified by:
clearWarningsin interfaceStatement- Throws:
SQLException
-
setWarning
-
getUpdateCount
- Specified by:
getUpdateCountin interfaceStatement- Throws:
SQLException
-
setUpdateCount
public void setUpdateCount(int updateCount) -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceStatement- Throws:
SQLException
-
unwrap
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
isPoolable
- Specified by:
isPoolablein interfaceStatement- Throws:
SQLException
-
setPoolable
- Specified by:
setPoolablein interfaceStatement- Throws:
SQLException
-
closeOnCompletion
- Specified by:
closeOnCompletionin interfaceStatement- Throws:
SQLException
-
isCloseOnCompletion
- Specified by:
isCloseOnCompletionin interfaceStatement- Throws:
SQLException
-
isClosed
- Specified by:
isClosedin interfaceStatement- Throws:
SQLException
-
getMoreResults
- Specified by:
getMoreResultsin interfaceStatement- Throws:
SQLException
-
addBatch
- Specified by:
addBatchin interfaceStatement- Throws:
SQLException
-
clearBatch
- Specified by:
clearBatchin interfaceStatement- Throws:
SQLException
-
getGeneratedKeys
- Specified by:
getGeneratedKeysin interfaceStatement- Throws:
SQLException
-
setGeneratedKeys
-
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
getResultSet
- Specified by:
getResultSetin interfaceStatement- Throws:
SQLException
-
executeBatch
- Specified by:
executeBatchin interfaceStatement- Throws:
SQLException
-
getMoreResults
- Specified by:
getMoreResultsin interfaceStatement- Throws:
SQLException
-
setWarnings
-
setResultSet
-
execute
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
executeQuery
- Specified by:
executeQueryin interfaceStatement- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException
-
cancel
- Specified by:
cancelin interfaceStatement- Throws:
SQLException
-