Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype UnsafePgQueryIO r a = UnsafePgQueryIO (ReaderT r IO a)
- type Logger = Logger
- type PgQueryM a = forall r. PgQueryEnv r => TxM r a
- type PgQueryEnv r = TxEnvs '[Connection, Logger] r :: Constraint
- unsafeToPgQueryIO :: HasCallStack => TxM r a -> UnsafePgQueryIO r a
- unsafeFromPgQueryIO :: HasCallStack => UnsafePgQueryIO r a -> TxM r a
- unsafeRunPgQueryTransaction :: (PgQueryEnv r, HasCallStack) => (HasCallStack => UnsafePgQueryIO r a -> UnsafePgQueryIO r a) -> r -> TxM r a -> IO a
Disclaimer
Changes to this module will not be reflected in the library's version updates.
Internals
newtype UnsafePgQueryIO r a Source #
Analogous to TxM
but allows for IO
. Useful so we can have
instances which are required to run postgresql-query
functions.
See unsafeToPgQueryIO
and unsafeFromPgQueryIO
for converting to/from
TxM
.
UnsafePgQueryIO (ReaderT r IO a) |
Instances
type PgQueryM a = forall r. PgQueryEnv r => TxM r a Source #
Monad type alias for running postgresql-query
via postgresql-tx
.
Since: 0.2.0.0
type PgQueryEnv r = TxEnvs '[Connection, Logger] r :: Constraint Source #
Runtime environment needed to run postgresql-query
via postgresql-tx
.
Since: 0.2.0.0
unsafeToPgQueryIO :: HasCallStack => TxM r a -> UnsafePgQueryIO r a Source #
unsafeFromPgQueryIO :: HasCallStack => UnsafePgQueryIO r a -> TxM r a Source #
unsafeRunPgQueryTransaction :: (PgQueryEnv r, HasCallStack) => (HasCallStack => UnsafePgQueryIO r a -> UnsafePgQueryIO r a) -> r -> TxM r a -> IO a Source #