类 StatementWrapper
- java.lang.Object
-
- com.mysql.cj.jdbc.StatementWrapper
-
- 所有已实现的接口:
AutoCloseable,Statement,Wrapper
- 直接已知子类:
PreparedStatementWrapper
public class StatementWrapper extends Object implements Statement
Wraps statements so that errors can be reported correctly to ConnectionEventListeners.
-
-
字段概要
字段 修饰符和类型 字段 说明 protected ExceptionInterceptorexceptionInterceptorprotected MysqlPooledConnectionpooledConnectionprotected Map<Class<?>,Object>unwrappedInterfacesprotected ConnectionWrapperwrappedConnprotected StatementwrappedStmt
-
构造器概要
构造器 构造器 说明 StatementWrapper(ConnectionWrapper c, MysqlPooledConnection conn, Statement toWrap)
-
方法概要
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 java.sql.Statement
enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, isSimpleIdentifier
-
-
-
-
字段详细资料
-
wrappedStmt
protected Statement wrappedStmt
-
wrappedConn
protected ConnectionWrapper wrappedConn
-
pooledConnection
protected MysqlPooledConnection pooledConnection
-
exceptionInterceptor
protected ExceptionInterceptor exceptionInterceptor
-
-
构造器详细资料
-
StatementWrapper
public StatementWrapper(ConnectionWrapper c, MysqlPooledConnection conn, Statement toWrap)
-
-
方法详细资料
-
getInstance
protected static StatementWrapper getInstance(ConnectionWrapper c, MysqlPooledConnection conn, Statement toWrap) throws SQLException
- 抛出:
SQLException
-
getConnection
public Connection getConnection() throws SQLException
- 指定者:
getConnection在接口中Statement- 抛出:
SQLException
-
setCursorName
public void setCursorName(String name) throws SQLException
- 指定者:
setCursorName在接口中Statement- 抛出:
SQLException
-
setEscapeProcessing
public void setEscapeProcessing(boolean enable) throws SQLException- 指定者:
setEscapeProcessing在接口中Statement- 抛出:
SQLException
-
setFetchDirection
public void setFetchDirection(int direction) throws SQLException- 指定者:
setFetchDirection在接口中Statement- 抛出:
SQLException
-
getFetchDirection
public int getFetchDirection() throws SQLException- 指定者:
getFetchDirection在接口中Statement- 抛出:
SQLException
-
setFetchSize
public void setFetchSize(int rows) throws SQLException- 指定者:
setFetchSize在接口中Statement- 抛出:
SQLException
-
getFetchSize
public int getFetchSize() throws SQLException- 指定者:
getFetchSize在接口中Statement- 抛出:
SQLException
-
getGeneratedKeys
public ResultSet getGeneratedKeys() throws SQLException
- 指定者:
getGeneratedKeys在接口中Statement- 抛出:
SQLException
-
setMaxFieldSize
public void setMaxFieldSize(int max) throws SQLException- 指定者:
setMaxFieldSize在接口中Statement- 抛出:
SQLException
-
getMaxFieldSize
public int getMaxFieldSize() throws SQLException- 指定者:
getMaxFieldSize在接口中Statement- 抛出:
SQLException
-
setMaxRows
public void setMaxRows(int max) throws SQLException- 指定者:
setMaxRows在接口中Statement- 抛出:
SQLException
-
getMaxRows
public int getMaxRows() throws SQLException- 指定者:
getMaxRows在接口中Statement- 抛出:
SQLException
-
getMoreResults
public boolean getMoreResults() throws SQLException- 指定者:
getMoreResults在接口中Statement- 抛出:
SQLException
-
getMoreResults
public boolean getMoreResults(int current) throws SQLException- 指定者:
getMoreResults在接口中Statement- 抛出:
SQLException
-
setQueryTimeout
public void setQueryTimeout(int seconds) throws SQLException- 指定者:
setQueryTimeout在接口中Statement- 抛出:
SQLException
-
getQueryTimeout
public int getQueryTimeout() throws SQLException- 指定者:
getQueryTimeout在接口中Statement- 抛出:
SQLException
-
getResultSet
public ResultSet getResultSet() throws SQLException
- 指定者:
getResultSet在接口中Statement- 抛出:
SQLException
-
getResultSetConcurrency
public int getResultSetConcurrency() throws SQLException- 指定者:
getResultSetConcurrency在接口中Statement- 抛出:
SQLException
-
getResultSetHoldability
public int getResultSetHoldability() throws SQLException- 指定者:
getResultSetHoldability在接口中Statement- 抛出:
SQLException
-
getResultSetType
public int getResultSetType() throws SQLException- 指定者:
getResultSetType在接口中Statement- 抛出:
SQLException
-
getUpdateCount
public int getUpdateCount() throws SQLException- 指定者:
getUpdateCount在接口中Statement- 抛出:
SQLException
-
getWarnings
public SQLWarning getWarnings() throws SQLException
- 指定者:
getWarnings在接口中Statement- 抛出:
SQLException
-
addBatch
public void addBatch(String sql) throws SQLException
- 指定者:
addBatch在接口中Statement- 抛出:
SQLException
-
cancel
public void cancel() throws SQLException- 指定者:
cancel在接口中Statement- 抛出:
SQLException
-
clearBatch
public void clearBatch() throws SQLException- 指定者:
clearBatch在接口中Statement- 抛出:
SQLException
-
clearWarnings
public void clearWarnings() throws SQLException- 指定者:
clearWarnings在接口中Statement- 抛出:
SQLException
-
close
public void close() throws SQLException- 指定者:
close在接口中AutoCloseable- 指定者:
close在接口中Statement- 抛出:
SQLException
-
execute
public boolean execute(String sql, int autoGeneratedKeys) throws SQLException
- 指定者:
execute在接口中Statement- 抛出:
SQLException
-
execute
public boolean execute(String sql, int[] columnIndexes) throws SQLException
- 指定者:
execute在接口中Statement- 抛出:
SQLException
-
execute
public boolean execute(String sql, String[] columnNames) throws SQLException
- 指定者:
execute在接口中Statement- 抛出:
SQLException
-
execute
public boolean execute(String sql) throws SQLException
- 指定者:
execute在接口中Statement- 抛出:
SQLException
-
executeBatch
public int[] executeBatch() throws SQLException- 指定者:
executeBatch在接口中Statement- 抛出:
SQLException
-
executeQuery
public ResultSet executeQuery(String sql) throws SQLException
- 指定者:
executeQuery在接口中Statement- 抛出:
SQLException
-
executeUpdate
public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException
- 指定者:
executeUpdate在接口中Statement- 抛出:
SQLException
-
executeUpdate
public int executeUpdate(String sql, int[] columnIndexes) throws SQLException
- 指定者:
executeUpdate在接口中Statement- 抛出:
SQLException
-
executeUpdate
public int executeUpdate(String sql, String[] columnNames) throws SQLException
- 指定者:
executeUpdate在接口中Statement- 抛出:
SQLException
-
executeUpdate
public int executeUpdate(String sql) throws SQLException
- 指定者:
executeUpdate在接口中Statement- 抛出:
SQLException
-
enableStreamingResults
public void enableStreamingResults() throws SQLException- 抛出:
SQLException
-
unwrap
public <T> T unwrap(Class<T> iface) throws SQLException
- 指定者:
unwrap在接口中Wrapper- 抛出:
SQLException
-
isWrapperFor
public boolean isWrapperFor(Class<?> iface) throws SQLException
- 指定者:
isWrapperFor在接口中Wrapper- 抛出:
SQLException
-
isClosed
public boolean isClosed() throws SQLException- 指定者:
isClosed在接口中Statement- 抛出:
SQLException
-
setPoolable
public void setPoolable(boolean poolable) throws SQLException- 指定者:
setPoolable在接口中Statement- 抛出:
SQLException
-
isPoolable
public boolean isPoolable() throws SQLException- 指定者:
isPoolable在接口中Statement- 抛出:
SQLException
-
closeOnCompletion
public void closeOnCompletion() throws SQLException- 指定者:
closeOnCompletion在接口中Statement- 抛出:
SQLException
-
isCloseOnCompletion
public boolean isCloseOnCompletion() throws SQLException- 指定者:
isCloseOnCompletion在接口中Statement- 抛出:
SQLException
-
executeLargeBatch
public long[] executeLargeBatch() throws SQLException- 指定者:
executeLargeBatch在接口中Statement- 抛出:
SQLException
-
executeLargeUpdate
public long executeLargeUpdate(String sql) throws SQLException
- 指定者:
executeLargeUpdate在接口中Statement- 抛出:
SQLException
-
executeLargeUpdate
public long executeLargeUpdate(String sql, int autoGeneratedKeys) throws SQLException
- 指定者:
executeLargeUpdate在接口中Statement- 抛出:
SQLException
-
executeLargeUpdate
public long executeLargeUpdate(String sql, int[] columnIndexes) throws SQLException
- 指定者:
executeLargeUpdate在接口中Statement- 抛出:
SQLException
-
executeLargeUpdate
public long executeLargeUpdate(String sql, String[] columnNames) throws SQLException
- 指定者:
executeLargeUpdate在接口中Statement- 抛出:
SQLException
-
getLargeMaxRows
public long getLargeMaxRows() throws SQLException- 指定者:
getLargeMaxRows在接口中Statement- 抛出:
SQLException
-
getLargeUpdateCount
public long getLargeUpdateCount() throws SQLException- 指定者:
getLargeUpdateCount在接口中Statement- 抛出:
SQLException
-
setLargeMaxRows
public void setLargeMaxRows(long max) throws SQLException- 指定者:
setLargeMaxRows在接口中Statement- 抛出:
SQLException
-
checkAndFireConnectionError
protected void checkAndFireConnectionError(SQLException sqlEx) throws SQLException
Fires connection error event if required, before re-throwing exception- 参数:
sqlEx- the SQLException that has occurred- 抛出:
SQLException- (rethrown)
-
-