api-docs / org.ktorm.database / JdbcTransactionManager
JdbcTransactionManager
class JdbcTransactionManager : TransactionManager
(source code)TransactionManager implementation based on JDBC.
This class is capable of working in any environment with any JDBC driver. It accepts a connector
function used to obtain SQL connections. Applications should return a native JDBC connection in
the callback function, no matter it’s newly established by DriverManager directly, or obtained
from a connection pool such as DataSource.
Database instances created by Database.connect functions use this implementation by default.
Constructors
Name | Summary |
---|---|
JdbcTransactionManager(connector: () -> Connection) TransactionManager implementation based on JDBC. |
Properties
Name | Summary |
---|---|
val connector: () -> Connection the callback function used to obtain SQL connections. | |
val currentTransaction: Transaction? The opened transaction of the current thread, null if there is no transaction opened. | |
val defaultIsolation: TransactionIsolation? The default transaction isolation, null for the default isolation level of the underlying datastore. |
Functions
Name | Summary |
---|---|
fun newConnection(): Connection Create a native JDBC connection to the database. | |
fun newTransaction( Open a new transaction for the current thread using the specific isolation if there is no transaction opened. |
Extension Functions
Name | Summary |
---|---|
infix fun <T : Any> T.eq( Equal operator, translated to | |
infix fun <T : Any> T.neq( Not-equal operator, translated to | |
infix fun <T : Any> T.notEq( Not-equal operator, translated to |