use of com.scalar.db.storage.jdbc.JdbcConfig in project scalardb by scalar-labs.
the class JdbcTransactionIntegrationTest method setUpBeforeClass.
@BeforeClass
public static void setUpBeforeClass() throws ExecutionException {
DatabaseConfig databaseConfig = TestUtils.addSuffix(JdbcEnv.getJdbcConfig(), TEST_NAME);
JdbcConfig config = new JdbcConfig(databaseConfig.getProperties());
StorageFactory factory = new StorageFactory(config);
admin = factory.getAdmin();
admin.createNamespace(NAMESPACE, true);
admin.createTable(NAMESPACE, TABLE, TableMetadata.newBuilder().addColumn(ACCOUNT_ID, DataType.INT).addColumn(ACCOUNT_TYPE, DataType.INT).addColumn(BALANCE, DataType.INT).addPartitionKey(ACCOUNT_ID).addClusteringKey(ACCOUNT_TYPE).build(), true);
manager = new JdbcTransactionManager(config);
}
Aggregations