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

database.DBTransaction.kt Maven / Gradle / Ivy

There is a newer version: 1.1.10
Show newest version
package database

import java.sql.Connection

/**
 * 数据库事务类
 * @property db DB 数据库类型
 * @property conn Connection? 数据库连接
 * @property isTransaction Boolean 值为true,代表是事务操作
 * @constructor
 */
class DBTransaction(override var db: DB, var conn: Connection? = null) : DataBaseImpl() {
    override val isTransaction: Boolean = true

    /**
     * 获取一个数据库连接
     * @return Connection 数据库连接
     */
    override fun getConnection(): Connection {
        return this.conn!!
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy