All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sqlg3.runtime.Transaction Maven / Gradle / Ivy

Go to download

SQLG is a preprocessor and a library that uses code generation to simplify writing JDBC code

There is a newer version: 3.1
Show newest version
package sqlg3.runtime;

import sqlg3.core.IDBCommon;
import sqlg3.core.ITransaction;

import java.sql.SQLException;

public final class Transaction implements ITransaction {

    private final TransactionContext transaction;

    public Transaction(GlobalContext global, SessionContext session) {
        this.transaction = new TransactionContext(global, session);
    }

    @Override
    public  T getInterface(Class iface) {
        return transaction.getInterface(iface, false, true);
    }

    @Override
    public void commit() throws SQLException {
        transaction.commit();
    }

    @Override
    public void rollback() throws SQLException {
        transaction.rollback();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy