use of com.hortonworks.registries.storage.impl.jdbc.provider.oracle.factory.OracleExecutor in project registry by hortonworks.
the class QueryExecutorFactory method get.
public static QueryExecutor get(String type, Map<String, Object> dbProperties) {
HikariCPConnectionBuilder connectionBuilder = getHikariCPConnnectionBuilder(dbProperties);
ExecutionConfig executionConfig = getExecutionConfig(dbProperties);
QueryExecutor queryExecutor = null;
switch(type) {
case "mysql":
queryExecutor = new MySqlExecutor(executionConfig, connectionBuilder);
break;
case "postgresql":
queryExecutor = new PostgresqlExecutor(executionConfig, connectionBuilder);
break;
case "oracle":
queryExecutor = new OracleExecutor(executionConfig, connectionBuilder);
break;
default:
throw new IllegalArgumentException("Unsupported storage provider type: " + type);
}
return queryExecutor;
}
Aggregations