graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hasura.Backends.Postgres.Connection.MonadTx

Description

Postgres Connection MonadTx

This module contains MonadTx and related combinators.

MonadTx, a class which abstracts the QErr in TxE via MonadError.

The combinators are used for running, tracing, or otherwise perform database related tasks. Please consult the individual documentation for more information.

Synopsis

Documentation

class MonadError QErr m => MonadTx m where Source #

Methods

liftTx :: TxE QErr a -> m a Source #

Instances

Instances details
MonadTx m => MonadTx (MetadataT m) Source # 
Instance details

Defined in Hasura.RQL.Types.SchemaCache.Build

Methods

liftTx :: TxE QErr a -> MetadataT m a Source #

MonadTx m => MonadTx (TraceT m) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Connection.MonadTx

Methods

liftTx :: TxE QErr a -> TraceT m a Source #

MonadTx m => MonadTx (TableCacheRT b m) Source # 
Instance details

Defined in Hasura.RQL.Types.SchemaCache

Methods

liftTx :: TxE QErr a -> TableCacheRT b m a Source #

MonadTx m => MonadTx (TableCoreCacheRT b m) Source # 
Instance details

Defined in Hasura.RQL.Types.SchemaCache

Methods

liftTx :: TxE QErr a -> TableCoreCacheRT b m a Source #

MonadTx m => MonadTx (ValidateT e m) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Connection.MonadTx

Methods

liftTx :: TxE QErr a -> ValidateT e m a Source #

MonadIO m => MonadTx (TxET QErr m) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Connection.MonadTx

Methods

liftTx :: TxE QErr a -> TxET QErr m a Source #

MonadTx m => MonadTx (ReaderT s m) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Connection.MonadTx

Methods

liftTx :: TxE QErr a -> ReaderT s m a Source #

MonadTx m => MonadTx (StateT s m) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Connection.MonadTx

Methods

liftTx :: TxE QErr a -> StateT s m a Source #

(Monoid w, MonadTx m) => MonadTx (WriterT w m) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Connection.MonadTx

Methods

liftTx :: TxE QErr a -> WriterT w m a Source #

runQueryTx :: (MonadIO m, MonadBaseControl IO m, MonadError QErr m) => PGExecCtx -> PGExecFrom -> TxET QErr m a -> m a Source #

This runs the given set of statements (Tx) without wrapping them in BEGIN and COMMIT. This should only be used for running a single statement query!

withTraceContext :: MonadIO m => Maybe TraceContext -> TxET QErr m a -> TxET QErr m a Source #

Inject the trace context as a transaction-local variable, so that it can be picked up by any triggers (including event triggers).

Orphan instances

MonadTrace m => MonadTrace (TxET e m) Source # 
Instance details