Search in sources :

Example 1 with BaseJdbcClient

use of io.prestosql.plugin.jdbc.BaseJdbcClient in project hetu-core by openlookeng.

the class TestDataSourceTableSplitManager method initSplitDatabase.

private void initSplitDatabase() throws SQLException {
    String connectionUrl;
    connectionUrl = "jdbc:h2:mem:test" + System.nanoTime() + ThreadLocalRandom.current().nextLong();
    jdbcClient = new BaseJdbcClient(new BaseJdbcConfig(), "\"", new DriverConnectionFactory(new Driver(), connectionUrl, Optional.empty(), Optional.empty(), new Properties()));
    connection = DriverManager.getConnection(connectionUrl);
}
Also used : BaseJdbcClient(io.prestosql.plugin.jdbc.BaseJdbcClient) DriverConnectionFactory(io.prestosql.plugin.jdbc.DriverConnectionFactory) Driver(org.h2.Driver) Properties(java.util.Properties) BaseJdbcConfig(io.prestosql.plugin.jdbc.BaseJdbcConfig)

Aggregations

BaseJdbcClient (io.prestosql.plugin.jdbc.BaseJdbcClient)1 BaseJdbcConfig (io.prestosql.plugin.jdbc.BaseJdbcConfig)1 DriverConnectionFactory (io.prestosql.plugin.jdbc.DriverConnectionFactory)1 Properties (java.util.Properties)1 Driver (org.h2.Driver)1