hasql-transaction-1.0.1: Composable abstraction over retryable transactions for Hasql
Safe HaskellNone
LanguageHaskell2010

Hasql.Transaction.Sessions

Synopsis

Documentation

transaction :: IsolationLevel -> Mode -> Transaction a -> Session a Source #

Execute the transaction using the provided isolation level and mode.

unpreparedTransaction :: IsolationLevel -> Mode -> Transaction a -> Session a Source #

Execute the transaction using the provided isolation level and mode, and specifying that the generated BEGIN, COMMIT and ABORT statements should not be prepared.

Helps with transaction pooling due to its incompatibility with prepared statements.

Transaction settings

data Mode Source #

 

Constructors

Read

Read-only. No writes possible.

Write

Write and commit.

Instances

Instances details
Bounded Mode Source # 
Instance details

Defined in Hasql.Transaction.Private.Model

Enum Mode Source # 
Instance details

Defined in Hasql.Transaction.Private.Model

Methods

succ :: Mode -> Mode #

pred :: Mode -> Mode #

toEnum :: Int -> Mode #

fromEnum :: Mode -> Int #

enumFrom :: Mode -> [Mode] #

enumFromThen :: Mode -> Mode -> [Mode] #

enumFromTo :: Mode -> Mode -> [Mode] #

enumFromThenTo :: Mode -> Mode -> Mode -> [Mode] #

Eq Mode Source # 
Instance details

Defined in Hasql.Transaction.Private.Model

Methods

(==) :: Mode -> Mode -> Bool #

(/=) :: Mode -> Mode -> Bool #

Ord Mode Source # 
Instance details

Defined in Hasql.Transaction.Private.Model

Methods

compare :: Mode -> Mode -> Ordering #

(<) :: Mode -> Mode -> Bool #

(<=) :: Mode -> Mode -> Bool #

(>) :: Mode -> Mode -> Bool #

(>=) :: Mode -> Mode -> Bool #

max :: Mode -> Mode -> Mode #

min :: Mode -> Mode -> Mode #

Show Mode Source # 
Instance details

Defined in Hasql.Transaction.Private.Model

Methods

showsPrec :: Int -> Mode -> ShowS #

show :: Mode -> String #

showList :: [Mode] -> ShowS #

data IsolationLevel Source #

For reference see the Postgres' documentation.

Instances

Instances details
Bounded IsolationLevel Source # 
Instance details

Defined in Hasql.Transaction.Private.Model

Enum IsolationLevel Source # 
Instance details

Defined in Hasql.Transaction.Private.Model

Eq IsolationLevel Source # 
Instance details

Defined in Hasql.Transaction.Private.Model

Ord IsolationLevel Source # 
Instance details

Defined in Hasql.Transaction.Private.Model

Show IsolationLevel Source # 
Instance details

Defined in Hasql.Transaction.Private.Model