com.alibaba.druid.mock
类 MockStatement

java.lang.Object
  继承者 com.alibaba.druid.util.jdbc.StatementBase
      继承者 com.alibaba.druid.mock.MockStatement
所有已实现的接口:
MockStatementBase, Statement, Wrapper

public class MockStatement
extends StatementBase
implements MockStatementBase, Statement


字段摘要
static String ERROR_SQL
           
 
从接口 java.sql.Statement 继承的字段
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
 
构造方法摘要
MockStatement(Connection connection)
           
 
方法摘要
 boolean execute(String sql)
           
 ResultSet executeQuery(String sql)
           
 int executeUpdate(String sql)
           
 MockConnection getConnection()
           
 void setFakeConnection(MockConnection fakeConnection)
           
 
从类 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
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
从接口 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
 
从接口 java.sql.Wrapper 继承的方法
isWrapperFor, unwrap
 

字段详细信息

ERROR_SQL

public static final String ERROR_SQL
另请参见:
常量字段值
构造方法详细信息

MockStatement

public MockStatement(Connection connection)
方法详细信息

getConnection

public MockConnection getConnection()
指定者:
接口 MockStatementBase 中的 getConnection
指定者:
接口 Statement 中的 getConnection
覆盖:
StatementBase 中的 getConnection

setFakeConnection

public void setFakeConnection(MockConnection fakeConnection)

executeQuery

public ResultSet executeQuery(String sql)
                       throws SQLException
指定者:
接口 Statement 中的 executeQuery
覆盖:
StatementBase 中的 executeQuery
抛出:
SQLException

executeUpdate

public int executeUpdate(String sql)
                  throws SQLException
指定者:
接口 Statement 中的 executeUpdate
覆盖:
StatementBase 中的 executeUpdate
抛出:
SQLException

execute

public boolean execute(String sql)
                throws SQLException
指定者:
接口 Statement 中的 execute
覆盖:
StatementBase 中的 execute
抛出:
SQLException


Copyright © 2013 Alibaba Group. All Rights Reserved.