use of com.ctrip.platform.dal.dao.DalHints in project dal by ctripcorp.
the class SqlServerDatabaseInitializer method tearDownAfterClass.
public static void tearDownAfterClass() throws Exception {
DalHints hints = new DalHints();
StatementParameters parameters = new StatementParameters();
String[] sqls = new String[] { DROP_TABLE_SQL, DROP_SP_WITHOUT_OUT_PARAM, DROP_SP_WITH_OUT_PARAM, DROP_SP_WITH_IN_OUT_PARAM, DROP_SP_WITH_INTERMEDIATE_RESULT };
for (int i = 0; i < sqls.length; i++) {
client.update(sqls[i], parameters, hints);
}
}
use of com.ctrip.platform.dal.dao.DalHints in project dal by ctripcorp.
the class SqlServerDatabaseInitializer method setUpBeforeClass.
public static void setUpBeforeClass() throws Exception {
DalHints hints = new DalHints();
StatementParameters parameters = new StatementParameters();
String[] sqls = new String[] { DROP_TABLE_SQL, CREATE_TABLE_SQL, DROP_SP_WITHOUT_OUT_PARAM, CREATE_SP_WITHOUT_OUT_PARAM, DROP_SP_WITH_OUT_PARAM, CREATE_SP_WITH_OUT_PARAM, DROP_SP_WITH_IN_OUT_PARAM, CREATE_SP_WITH_IN_OUT_PARAM, DROP_SP_WITH_INTERMEDIATE_RESULT, CREATE_SP_WITH_INTERMEDIATE_RESULT };
for (int i = 0; i < sqls.length; i++) {
client.update(sqls[i], parameters, hints);
}
}
use of com.ctrip.platform.dal.dao.DalHints in project dal by ctripcorp.
the class OracleTestInitializer method tearDown.
@After
public static void tearDown() throws Exception {
String sql = "DELETE FROM " + TABLE_NAME;
StatementParameters parameters = new StatementParameters();
DalHints hints = new DalHints();
client.update(sql, parameters, hints);
}
use of com.ctrip.platform.dal.dao.DalHints in project dal by ctripcorp.
the class OracleTestInitializer method tearDownAfterClass.
@AfterClass
public static void tearDownAfterClass() throws Exception {
DalHints hints = new DalHints();
String[] sqls = new String[] { DROP_TABLE_SEQ, DROP_TABLE_TRIG, DROP_TABLE_SQL };
client.batchUpdate(sqls, hints);
}
use of com.ctrip.platform.dal.dao.DalHints in project dal by ctripcorp.
the class DalQueryDaoTestStub method prepareData.
public static void prepareData(String dbName) throws Exception {
String insertSql = "INSERT INTO " + TABLE_NAME + "(quantity,type,address)" + " VALUES(?, ?, ?)";
StatementParameters[] parameterList = new StatementParameters[ROW_COUNT];
Random random = new Random();
for (int i = 0; i < ROW_COUNT; i++) {
StatementParameters param = new StatementParameters();
int quantity = random.nextInt(5);
int type = random.nextInt(3);
param.set(1, Types.INTEGER, 10 + quantity);
param.set(2, Types.SMALLINT, type);
param.set(3, Types.VARCHAR, "SZ INFO" + "_" + i % 100 + "#");
parameterList[i] = param;
}
DalClientFactory.getClient(dbName).batchUpdate(insertSql, parameterList, new DalHints());
}
Aggregations