com.vladsch.kotlin.jdbc.TransactionImpl.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-jdbc Show documentation
Show all versions of kotlin-jdbc Show documentation
A thin library that exposes JDBC API with the convenience of Kotlin and gets out of the way when not needed.
The newest version!
package com.vladsch.kotlin.jdbc
import java.sql.Savepoint
class TransactionImpl(
connection: Connection,
autoGeneratedKeys: List = listOf()
) : SessionImpl(connection, autoGeneratedKeys), Transaction {
override fun commit() {
connection.commit()
}
override fun begin() {
connection.begin()
}
override fun rollback() {
connection.rollback()
}
override fun setSavepoint(): Savepoint {
return connection.setSavepoint()
}
override fun setSavepoint(name: String): Savepoint {
return connection.setSavepoint(name)
}
override fun rollback(savepoint: Savepoint) {
connection.rollback(savepoint)
}
override fun releaseSavepoint(savepoint: Savepoint) {
connection.releaseSavepoint(savepoint)
}
}