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 Type
    Method
    Description
    execute(Connection connection, com.github.tadukoo.util.logger.EasyLogger logger)
    Executes the transaction using the given connection, and will log messages as needed to the given EasyLogger
     
  • 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 given EasyLogger
      Parameters:
      connection - The Connection to use for the transaction
      logger - The EasyLogger to use for logging messages as needed
      Returns:
      The result of the transaction
      Throws:
      SQLException - If anything goes wrong