commit : Connection -> IO (Either OracleError ()) Commit the current transaction on a connection.
All changes made since the last commit or rollback become permanent.
Returns:
- Right () on success.
- Left OracleError on failure.
Totality: total
Visibility: exportrollback : Connection -> IO (Either OracleError ()) Roll back the current transaction on a connection.
All changes made since the last commit or rollback are discarded.
Returns:
- Right () on success.
- Left OracleError on failure.
Totality: total
Visibility: exportwithTransaction : Connection -> IO (Either OracleError a) -> IO (Either OracleError a) Execute an action inside a transaction.
The transaction behavior is:
- If the action returns Right -> commit is performed.
- If the action returns Left -> rollback is performed.
The original error is preserved if rollback succeeds.
Example:
```idris
withTransaction conn $ do
execute stmt1
execute stmt2
```
Totality: total
Visibility: export