Class SqlConnectionRunner
- java.lang.Object
-
- pro.taskana.task.internal.jobs.helper.SqlConnectionRunner
-
public class SqlConnectionRunner extends Object
Run low level SQL Statements reusing the taskana datasource.
-
-
Constructor Summary
Constructors Constructor Description SqlConnectionRunner(TaskanaEngine taskanaEngine)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectiongetConnection()voidrunWithConnection(CheckedConsumer<Connection,SQLException> consumer)Run custom queries on a given connection.
-
-
-
Constructor Detail
-
SqlConnectionRunner
public SqlConnectionRunner(TaskanaEngine taskanaEngine)
-
-
Method Detail
-
runWithConnection
public void runWithConnection(CheckedConsumer<Connection,SQLException> consumer)
Run custom queries on a given connection. Please check for committing changes.- Parameters:
consumer- consumes a connection.- Throws:
SystemException- will pass on any checked SQLException as a runtime SystemException
-
getConnection
public Connection getConnection() throws SQLException
- Throws:
SQLException
-
-