orville-postgresql-1.0.0.0: A Haskell library for PostgreSQL
CopyrightFlipstone Technology Partners 2023
LicenseMIT
StabilityStable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Orville.PostgreSQL.Monad.Orville

Description

Since: 1.0.0.0

Synopsis

Documentation

data Orville a Source #

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

Instances details
MonadIO Orville Source # 
Instance details

Defined in Orville.PostgreSQL.Monad.Orville

Methods

liftIO :: IO a -> Orville a #

Applicative Orville Source # 
Instance details

Defined in Orville.PostgreSQL.Monad.Orville

Methods

pure :: a -> Orville a #

(<*>) :: Orville (a -> b) -> Orville a -> Orville b #

liftA2 :: (a -> b -> c) -> Orville a -> Orville b -> Orville c #

(*>) :: Orville a -> Orville b -> Orville b #

(<*) :: Orville a -> Orville b -> Orville a #

Functor Orville Source # 
Instance details

Defined in Orville.PostgreSQL.Monad.Orville

Methods

fmap :: (a -> b) -> Orville a -> Orville b #

(<$) :: a -> Orville b -> Orville a #

Monad Orville Source # 
Instance details

Defined in Orville.PostgreSQL.Monad.Orville

Methods

(>>=) :: Orville a -> (a -> Orville b) -> Orville b #

(>>) :: Orville a -> Orville b -> Orville b #

return :: a -> Orville a #

MonadCatch Orville Source # 
Instance details

Defined in Orville.PostgreSQL.Monad.Orville

Methods

catch :: Exception e => Orville a -> (e -> Orville a) -> Orville a #

MonadThrow Orville Source # 
Instance details

Defined in Orville.PostgreSQL.Monad.Orville

Methods

throwM :: Exception e => e -> Orville a #

MonadOrville Orville Source # 
Instance details

Defined in Orville.PostgreSQL.Monad.Orville

MonadOrvilleControl Orville Source # 
Instance details

Defined in Orville.PostgreSQL.Monad.Orville

Methods

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 # 
Instance details

Defined in Orville.PostgreSQL.Monad.Orville

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