Package org.apache.drill.metastore.rdbms
Class QueryExecutorProvider
java.lang.Object
org.apache.drill.metastore.rdbms.QueryExecutorProvider
- All Implemented Interfaces:
AutoCloseable
Provides SQL queries executor configured based on given data source and SQL dialect.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
QueryExecutorProvider
public QueryExecutorProvider(com.zaxxer.hikari.HikariDataSource dataSource)
-
-
Method Details
-
executor
public org.jooq.DSLContext executor()Provides query executor which can be used to execute various SQL statements. Executor transforms programmatically created queries into configured SQL dialect, executes them using connections from provided data source. Allows to execute SQL queries in transaction. Note: always close executor to release open connections.- Returns:
- query executor
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-