Copyright | Flipstone Technology Partners 2023 |
---|---|
License | MIT |
Stability | Stable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Orville.PostgreSQL.Monad.Orville
Description
Since: 1.0.0.0
Synopsis
- data Orville a
- runOrville :: ConnectionPool -> Orville a -> IO a
- runOrvilleWithState :: OrvilleState -> Orville a -> IO a
Documentation
The Orville
Monad provides an easy starter implementation of
MonadOrville
when you don't have a monad specific to your
application that you need to use.
If you want to add Orville capabilities to your own monad, take a look at
MonadOrville
to learn what needs to be done.
Since: 1.0.0.0
Instances
runOrville :: ConnectionPool -> Orville a -> IO a Source #
Runs an Orville
operation in the IO
monad using the given connection
pool.
This will run the Orville
operation with the
ErrorDetailLevel
set to the default. If you want to run
with a different detail level, you can use newOrvilleState
to
create a state with the desired detail level and then use
runOrvilleWithState
.
Since: 1.0.0.0
runOrvilleWithState :: OrvilleState -> Orville a -> IO a Source #
Runs an Orville
operation in the IO
monad, starting from the provided
OrvilleState
.
Caution: If you harvest an OrvilleState
from inside a
MonadOrville
monad using askOrvilleState
,
you may pick up connection tracking state that you didn't intend to. You
may want to use resetOrvilleState
in this situation to get
a new initial state before passing it to runOrvilleWithState
.
On the other hand, if you know that you want to pass the existing connection
state from another monad into the Orville
monad, this is how you do it.
Since: 1.0.0.0