[MyBatis源码分析系列] Transaction

Transaction

简介

包装数据库的连接java.sql.Connection
处理连接的生命周期:创建,预编译,提交/回滚和关闭。

源码

public interface Transaction {
	Connection getConnection() throws SQLException;

	void commit() throws SQLException;
	
	void rollback() throws SQLException;

	void close() throws SQLException;

	Integer getTimeout() throws SQLException;
}

猜你喜欢

转载自blog.csdn.net/weixin_36210698/article/details/83500899