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

io.yawp.driver.postgresql.PGTransactionDriver Maven / Gradle / Ivy

There is a newer version: 2.08alpha
Show newest version
package io.yawp.driver.postgresql;

import io.yawp.driver.api.TransactionDriver;
import io.yawp.driver.postgresql.sql.ConnectionManager;

public class PGTransactionDriver implements TransactionDriver {

    private ConnectionManager connectionManager;

    public PGTransactionDriver(ConnectionManager connectionManager) {
        this.connectionManager = connectionManager;
    }

    @Override
    public TransactionDriver begin() {
        connectionManager.beginTransaction();
        return this;
    }

    @Override
    public TransactionDriver beginX() {
        return begin();
    }

    @Override
    public void rollback() {
        connectionManager.rollback();
    }

    @Override
    public void commit() {
        connectionManager.commit();
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy