net.sf.aguacate.context.spi.sql.impl.SentenceSqlBeginTransaction Maven / Gradle / Ivy
package net.sf.aguacate.context.spi.sql.impl;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import net.sf.aguacate.function.FunctionContext;
import net.sf.aguacate.function.FunctionEvalResult;
public class SentenceSqlBeginTransaction extends AbstractSentenceSql {
public SentenceSqlBeginTransaction(String name, String message, List methods) {
super(name, message, methods);
}
@Override
public FunctionEvalResult evaluate0(FunctionContext functionContext, Map context)
throws SQLException {
Connection connection = functionContext.acquireConnection();
connection.setAutoCommit(false);
// connection.setTransactionIsolation(Connection.TRANSACTION_NONE);
return SUCCESS;
}
}