use of com.microsoft.sqlserver.testframework.DBTable in project mssql-jdbc by Microsoft.
the class BulkCopyColumnMappingTest method testNoExplicitCM.
@Test
@DisplayName("BulkCopy:test no explicit column mapping")
void testNoExplicitCM() {
// create dest table
DBTable destTable = sourceTable.cloneSchema();
stmt.createTable(destTable);
// set up bulkCopy without explicit column mapping
BulkCopyTestWrapper bulkWrapper = new BulkCopyTestWrapper(connectionString);
bulkWrapper.setUsingConnection((0 == ThreadLocalRandom.current().nextInt(2)) ? true : false);
BulkCopyTestUtil.performBulkCopy(bulkWrapper, sourceTable, destTable);
}
use of com.microsoft.sqlserver.testframework.DBTable in project mssql-jdbc by Microsoft.
the class lobsTest method createTable.
private static DBTable createTable(DBTable table, String[] types, boolean populateTable) throws Exception {
DBStatement stmt = new DBConnection(connectionString).createStatement();
table = new DBTable(false);
for (String type1 : types) {
SqlType type = Utils.find(type1);
table.addColumn(type);
}
stmt.createTable(table);
if (populateTable) {
stmt.populateTable(table);
}
stmt.close();
return table;
}
use of com.microsoft.sqlserver.testframework.DBTable in project mssql-jdbc by Microsoft.
the class bvtTestSetup method init.
@BeforeAll
public static void init() throws SQLException {
try (DBConnection conn = new DBConnection(connectionString);
DBStatement stmt = conn.createStatement()) {
// create tables
table1 = new DBTable(true);
stmt.createTable(table1);
stmt.populateTable(table1);
table2 = new DBTable(true);
stmt.createTable(table2);
stmt.populateTable(table2);
}
}
Aggregations