public interface Transaction extends SqlStream
Connection.
This object implements AutoCloseable so that you can write code like
try (Transaction tr = sql.transaction()) {
// Code in transaction
} // Automatic rollback
| Modifier and Type | Interface and Description |
|---|---|
static class |
Transaction.IsolationLevel |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the current transaction, rolling back any changes not committed.
|
Transaction |
commit()
Commits the current transaction.
|
Connection |
getConnection()
Gets the underlying
Connection of this transaction. |
Transaction |
rollback()
Rollbacks the current transaction.
|
batchUpdate, call, connect, connect, exec, execute, first, query, query, registerCustomBinding, transaction, transaction, update, updateTransaction commit()
this for chainingConnection.commit()Transaction rollback()
this for chainingConnection.rollback()Connection getConnection()
Connection of this transaction.Copyright © 2019. All rights reserved.