Copyright | Flipstone Technology Partners 2023 |
---|---|
License | MIT |
Stability | Stable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
MonadIO Orville Source # | |
Defined in Orville.PostgreSQL.Monad.Orville | |
Applicative Orville Source # | |
Functor Orville Source # | |
Monad Orville Source # | |
MonadCatch Orville Source # | |
MonadThrow Orville Source # | |
Defined in Orville.PostgreSQL.Monad.Orville | |
MonadOrville Orville Source # | |
Defined in Orville.PostgreSQL.Monad.Orville | |
MonadOrvilleControl Orville Source # | |
Defined in Orville.PostgreSQL.Monad.Orville liftWithConnection :: (forall a. (Connection -> IO a) -> IO a) -> (Connection -> Orville b) -> Orville b Source # liftCatch :: Exception e => (forall a. IO a -> (e -> IO a) -> IO a) -> Orville b -> (e -> Orville b) -> Orville b Source # liftMask :: (forall b. ((forall a. IO a -> IO a) -> IO b) -> IO b) -> ((forall a. Orville a -> Orville a) -> Orville c) -> Orville c Source # | |
HasOrvilleState Orville Source # | |
Defined in Orville.PostgreSQL.Monad.Orville askOrvilleState :: Orville OrvilleState Source # localOrvilleState :: (OrvilleState -> OrvilleState) -> Orville a -> Orville a Source # |
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