Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data TransactionIO a
- condemn :: TransactionIO ()
- sql :: ByteString -> TransactionIO ()
- statement :: params -> Statement params result -> TransactionIO result
Documentation
data TransactionIO a Source #
A mixture of Hasql statements and arbitrary IO that is all performed during a single transaction
Instances
condemn :: TransactionIO () Source #
Throw an internal exception that causes the transaction to be rolled back. If you wish to rollback a transaction with a more useful exception use throwIO
sql :: ByteString -> TransactionIO () Source #
Like sql
but in a TransactionIO
. It should not attempt any statements that cannot be safely run inside a transaction.
statement :: params -> Statement params result -> TransactionIO result Source #
Like statement
but in a TransactionIO
. It should not attempt any statements that cannot be safely run inside a transaction.