Interface SQLTransaction<ResultType>
- Type Parameters:
ResultType
- The type of result returned from executing the transaction
- All Known Implementing Classes:
InsertAndGetID
,Query
,Updates
public interface SQLTransaction<ResultType>
Represents a transaction in MySQL
- Version:
- Alpha v.0.3
- Author:
- Logan Ferree (Tadukoo)
-
Method Summary
Modifier and TypeMethodDescriptionexecute
(Connection connection, com.github.tadukoo.util.logger.EasyLogger logger) Executes the transaction using the given connection, and will log messages as needed to the givenEasyLogger
-
Method Details
-
getTransactionName
String getTransactionName()- Returns:
- The name of the transaction, used for logging purposes
-
execute
ResultType execute(Connection connection, com.github.tadukoo.util.logger.EasyLogger logger) throws SQLException Executes the transaction using the given connection, and will log messages as needed to the givenEasyLogger
- Parameters:
connection
- TheConnection
to use for the transactionlogger
- TheEasyLogger
to use for logging messages as needed- Returns:
- The result of the transaction
- Throws:
SQLException
- If anything goes wrong
-