Package com.alibaba.druid.pool
Class DruidPooledStatement
java.lang.Object
com.alibaba.druid.pool.PoolableWrapper
com.alibaba.druid.pool.DruidPooledStatement
- All Implemented Interfaces:
AutoCloseable,Statement,Wrapper
- Direct Known Subclasses:
DruidPooledPreparedStatement
- Author:
- wenshao [szujobs@hotmail.com]
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected DruidPooledConnectionprotected intprotected intFields 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 TypeMethodDescriptionfinal voidprotected voidaddResultSetTrace(ResultSet resultSet) final voidcancel()protected SQLExceptioncheckException(Throwable error) protected SQLExceptioncheckException(Throwable error, String sql) protected voidfinal voidprotected voidfinal voidvoidclose()voidprotected final voidfinal booleanfinal booleanfinal booleanfinal booleanint[]final ResultSetexecuteQuery(String sql) final intexecuteUpdate(String sql) final intexecuteUpdate(String sql, int autoGeneratedKeys) final intexecuteUpdate(String sql, int[] columnIndexes) final intexecuteUpdate(String sql, String[] columnNames) final Connectionfinal intintfinal intfinal ResultSetintfinal intfinal booleanfinal booleangetMoreResults(int current) final intfinal ResultSetfinal intfinal intfinal intfinal intfinal SQLWarningprotected voidhandleSocketTimeout(Throwable error) voidvoidvoidvoidfinal booleanisClosed()booleanfinal booleanprotected voidrecordFetchRowCount(int fetchRowCount) final voidsetCursorName(String name) final voidsetEscapeProcessing(boolean enable) voidsetFetchDirection(int direction) voidsetFetchSize(int rows) voidsetMaxFieldSize(int max) voidsetMaxRows(int max) final voidsetPoolable(boolean poolable) voidsetQueryTimeout(int seconds) toString()protected voidtransactionRecord(String sql) Methods inherited from class com.alibaba.druid.pool.PoolableWrapper
isWrapperFor, unwrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.sql.Statement
enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, isSimpleIdentifier, setLargeMaxRowsMethods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Field Details
-
conn
-
resultSetTrace
-
closed
protected boolean closed -
fetchRowPeak
protected int fetchRowPeak -
exceptionCount
protected int exceptionCount
-
-
Constructor Details
-
DruidPooledStatement
-
-
Method Details
-
addResultSetTrace
-
recordFetchRowCount
protected void recordFetchRowCount(int fetchRowCount) -
getFetchRowPeak
public int getFetchRowPeak() -
checkException
- Throws:
SQLException
-
checkException
- Throws:
SQLException
-
handleSocketTimeout
- Throws:
SQLException
-
getPoolableConnection
-
getStatement
-
checkOpen
- Throws:
SQLException
-
clearResultSet
protected void clearResultSet() -
incrementExecuteCount
public void incrementExecuteCount() -
incrementExecuteBatchCount
public void incrementExecuteBatchCount() -
incrementExecuteUpdateCount
public void incrementExecuteUpdateCount() -
incrementExecuteQueryCount
public void incrementExecuteQueryCount() -
transactionRecord
- Throws:
SQLException
-
executeQuery
- Specified by:
executeQueryin interfaceStatement- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException
-
errorCheck
-
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
-
getMaxFieldSize
- Specified by:
getMaxFieldSizein interfaceStatement- Throws:
SQLException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein 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
-
getQueryTimeout
- Specified by:
getQueryTimeoutin interfaceStatement- Throws:
SQLException
-
setQueryTimeout
- Specified by:
setQueryTimeoutin interfaceStatement- Throws:
SQLException
-
cancel
- Specified by:
cancelin interfaceStatement- Throws:
SQLException
-
getWarnings
- Specified by:
getWarningsin interfaceStatement- Throws:
SQLException
-
clearWarnings
- Specified by:
clearWarningsin interfaceStatement- Throws:
SQLException
-
setCursorName
- Specified by:
setCursorNamein interfaceStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
getResultSet
- Specified by:
getResultSetin interfaceStatement- Throws:
SQLException
-
getUpdateCount
- Specified by:
getUpdateCountin interfaceStatement- Throws:
SQLException
-
getMoreResults
- Specified by:
getMoreResultsin interfaceStatement- 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
-
getResultSetConcurrency
- Specified by:
getResultSetConcurrencyin interfaceStatement- Throws:
SQLException
-
getResultSetType
- Specified by:
getResultSetTypein interfaceStatement- Throws:
SQLException
-
addBatch
- Specified by:
addBatchin interfaceStatement- Throws:
SQLException
-
clearBatch
- Specified by:
clearBatchin interfaceStatement- Throws:
SQLException
-
executeBatch
- Specified by:
executeBatchin interfaceStatement- Throws:
SQLException
-
getConnection
- Specified by:
getConnectionin interfaceStatement- Throws:
SQLException
-
getMoreResults
- Specified by:
getMoreResultsin interfaceStatement- Throws:
SQLException
-
getGeneratedKeys
- Specified by:
getGeneratedKeysin interfaceStatement- Throws:
SQLException
-
getResultSetHoldability
- Specified by:
getResultSetHoldabilityin interfaceStatement- Throws:
SQLException
-
isClosed
- Specified by:
isClosedin interfaceStatement- Throws:
SQLException
-
setPoolable
- Specified by:
setPoolablein interfaceStatement- Throws:
SQLException
-
isPoolable
- Specified by:
isPoolablein interfaceStatement- Throws:
SQLException
-
toString
-
closeOnCompletion
- Specified by:
closeOnCompletionin interfaceStatement- Throws:
SQLException
-
isCloseOnCompletion
- Specified by:
isCloseOnCompletionin interfaceStatement- Throws:
SQLException
-