本文整理匯總了Java中com.taobao.tddl.common.mock.MockDataSource.ExecuteInfo類的典型用法代碼示例。如果您正苦於以下問題:Java ExecuteInfo類的具體用法?Java ExecuteInfo怎麽用?Java ExecuteInfo使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ExecuteInfo類屬於com.taobao.tddl.common.mock.MockDataSource包,在下文中一共展示了ExecuteInfo類的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: executeBatch
import com.taobao.tddl.common.mock.MockDataSource.ExecuteInfo; //導入依賴的package包/類
public int[] executeBatch() throws SQLException {
// int[] ints = new int[batchedArgs.size()];
// for(int i = 0 ; i <ints.length ; i ++){
// ints[i] = executeUpdate();
// }
// return ints;
mds.checkState();
MockDataSource.record(new ExecuteInfo(this.mds, "executeBatch", this.sql, null));
return new int[] { -1, -1 };
}
示例2: execute
import com.taobao.tddl.common.mock.MockDataSource.ExecuteInfo; //導入依賴的package包/類
public boolean execute(String sql) throws SQLException {
mds.checkState();
this.sql = sql;
executeSqlInvokingTimes++;
logger.warn("[execute(String)]" + sql);
MockDataSource.record(new ExecuteInfo(this.mds, "execute", this.sql, null));
return success;
}
示例3: executeSql
import com.taobao.tddl.common.mock.MockDataSource.ExecuteInfo; //導入依賴的package包/類
public boolean executeSql(String method, String tsql) {
sql = tsql;
executeSqlInvokingTimes++;
logger.warn("[executerHandler]" + sql);
MockDataSource.record(new ExecuteInfo(MockStatement.this.mds,
method,
MockStatement.this.sql,
null));
return true;
}
示例4: updateInternal
import com.taobao.tddl.common.mock.MockDataSource.ExecuteInfo; //導入依賴的package包/類
protected int updateInternal(String method, String sql) {
try {
Thread.sleep(insertSleepTime);
} catch (InterruptedException e) {
e.printStackTrace();
}
this.sql = sql;
MockDataSource.record(new ExecuteInfo(this.mds, method, this.sql, null));
logger.warn("[UpdateHandler]" + sql);
return MockDataSource.popPreAffectedRow();
}
示例5: MockConnection
import com.taobao.tddl.common.mock.MockDataSource.ExecuteInfo; //導入依賴的package包/類
public MockConnection(String method, MockDataSource mockDataSource){
this.mockDataSource = mockDataSource;
MockDataSource.record(new ExecuteInfo(this.mockDataSource, method, null, null));
}
示例6: commit
import com.taobao.tddl.common.mock.MockDataSource.ExecuteInfo; //導入依賴的package包/類
public void commit() throws SQLException {
mockDataSource.checkState();
checkClose();
MockDataSource.record(new ExecuteInfo(mockDataSource, "commit", null, null));
commitInvokingTimes++;
}
示例7: rollback
import com.taobao.tddl.common.mock.MockDataSource.ExecuteInfo; //導入依賴的package包/類
public void rollback() throws SQLException {
mockDataSource.checkState();
checkClose();
MockDataSource.record(new ExecuteInfo(mockDataSource, "rollback", null, null));
rollbackInvotingTimes++;
}
示例8: setAutoCommit
import com.taobao.tddl.common.mock.MockDataSource.ExecuteInfo; //導入依賴的package包/類
public void setAutoCommit(boolean autoCommit) throws SQLException {
mockDataSource.checkState();
checkClose();
MockDataSource.record(new ExecuteInfo(mockDataSource, "setAutoCommit", null, new Object[] { autoCommit }));
this.autoCommit = autoCommit;
}
示例9: MockStatement
import com.taobao.tddl.common.mock.MockDataSource.ExecuteInfo; //導入依賴的package包/類
public MockStatement(String method, MockDataSource mockDataSource, String sql){
this.sql = sql;
this.mds = mockDataSource;
MockDataSource.record(new ExecuteInfo(this.mds, method, null, null));
}
示例10: executeBatch
import com.taobao.tddl.common.mock.MockDataSource.ExecuteInfo; //導入依賴的package包/類
public int[] executeBatch() throws SQLException {
mds.checkState();
logger.warn("[executeBatch]" + sql);
MockDataSource.record(new ExecuteInfo(this.mds, "executeBatch", this.sql, null));
return new int[] { -1, -1 };
}
示例11: getMetaData
import com.taobao.tddl.common.mock.MockDataSource.ExecuteInfo; //導入依賴的package包/類
public ResultSetMetaData getMetaData() throws SQLException {
MockDataSource.record(new ExecuteInfo(this.mds, "ResultSet.getMetaData", null, null));
return this.resultSetMetaData;
}