Package io.trino.tempto.query
Class JdbcQueryExecutor
java.lang.Object
io.trino.tempto.query.JdbcQueryExecutor
- All Implemented Interfaces:
QueryExecutor,Closeable,AutoCloseable
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.trino.tempto.query.QueryExecutor
QueryExecutor.QueryParam -
Field Summary
Fields inherited from interface io.trino.tempto.query.QueryExecutor
DEFAULT_DB_NAME -
Constructor Summary
ConstructorsConstructorDescriptionJdbcQueryExecutor(JdbcConnectivityParamsState jdbcParamsState, JdbcConnectionsPool jdbcConnectionsPool, TestContext testContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidexecuteQuery(String sql, QueryExecutor.QueryParam... params) Executes statement.void
-
Constructor Details
-
JdbcQueryExecutor
@Inject public JdbcQueryExecutor(JdbcConnectivityParamsState jdbcParamsState, JdbcConnectionsPool jdbcConnectionsPool, TestContext testContext)
-
-
Method Details
-
openConnection
public void openConnection() -
closeConnection
public void closeConnection() -
executeQuery
public QueryResult executeQuery(String sql, QueryExecutor.QueryParam... params) throws QueryExecutionException Description copied from interface:QueryExecutorExecutes statement. Can be either SELECT or DDL/DML. DDL/DML integer result is wrapped into QueryResult- Specified by:
executeQueryin interfaceQueryExecutor- Parameters:
sql- SQL query to be executedparams- Parameters to be used while executing query- Returns:
- Result of executed statement.
- Throws:
QueryExecutionException
-
getConnection
- Specified by:
getConnectionin interfaceQueryExecutor
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceQueryExecutor
-