Package io.trino.tempto.query
Interface QueryExecutor
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
JdbcQueryExecutor
Interface for executors of a sql queries.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.The concept of default query executor has been found to be confusing and will be removed. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static QueryExecutorDeprecated.The concept of default query executor has been found to be confusing and will be removed.executeQuery(String sql, QueryExecutor.QueryParam... params) Executes statement.static QueryExecutor.QueryParamstatic QueryResultquery(String sql, QueryExecutor.QueryParam... params) Deprecated.This method runs a query on thedefault executor.
-
Field Details
-
DEFAULT_DB_NAME
Deprecated.The concept of default query executor has been found to be confusing and will be removed.- See Also:
-
-
Method Details
-
executeQuery
QueryResult executeQuery(String sql, QueryExecutor.QueryParam... params) throws QueryExecutionException Executes statement. Can be either SELECT or DDL/DML. DDL/DML integer result is wrapped into QueryResult- Parameters:
sql- SQL query to be executedparams- Parameters to be used while executing query- Returns:
- Result of executed statement.
- Throws:
QueryExecutionException
-
getConnection
Connection getConnection() -
close
void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
query
@Deprecated static QueryResult query(String sql, QueryExecutor.QueryParam... params) throws QueryExecutionException Deprecated.This method runs a query on thedefault executor. The concept of default query executor has been found to be confusing and will be removed.Executes given query on DB setup in test context.- Parameters:
sql- SQL query to be executedparams- Parameters to be used while executing query- Returns:
- QueryResult
- Throws:
QueryExecutionException
-
defaultQueryExecutor
Deprecated.The concept of default query executor has been found to be confusing and will be removed. -
param
-