com.alibaba.druid.pool.ElasticSearchDruidDataSourceFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of elasticsearch-sql Show documentation
Show all versions of elasticsearch-sql Show documentation
Query elasticsearch using SQL
package com.alibaba.druid.pool;
import javax.sql.DataSource;
import java.util.Map;
import java.util.Properties;
/**
* Created by allwefantasy on 8/30/16.
*/
public class ElasticSearchDruidDataSourceFactory extends DruidDataSourceFactory {
@Override
protected DataSource createDataSourceInternal(Properties properties) throws Exception {
DruidDataSource dataSource = new ElasticSearchDruidDataSource();
config(dataSource, properties);
return dataSource;
}
@SuppressWarnings("rawtypes")
public static DataSource createDataSource(Properties properties) throws Exception {
return createDataSource((Map) properties);
}
@SuppressWarnings("rawtypes")
public static DataSource createDataSource(Map properties) throws Exception {
DruidDataSource dataSource = new ElasticSearchDruidDataSource();
config(dataSource, properties);
return dataSource;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy