本文整理汇总了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;
}