Safe Haskell | None |
---|---|
Language | Haskell2010 |
Postgres Instances Transport
Defines the MSSQL instance of BackendTransport
and how to interact with the
database for running queries, mutations, subscriptions, and so on.
Documentation
:: (MonadIO m, MonadError QErr m, MonadQueryLog m, MonadTrace m) | |
=> RequestId | |
-> GQLReqUnparsed | |
-> RootFieldAlias | |
-> UserInfo | |
-> Logger Hasura | |
-> SourceConfig ('Postgres pgKind) | |
-> TraceT (TxET QErr IO) EncJSON | |
-> Maybe PreparedSql | |
-> m (DiffTime, EncJSON) | Also return the time spent in the PG query; for telemetry. |
runPGMutation :: (MonadIO m, MonadError QErr m, MonadQueryLog m, MonadTrace m) => RequestId -> GQLReqUnparsed -> RootFieldAlias -> UserInfo -> Logger Hasura -> SourceConfig ('Postgres pgKind) -> TraceT (TxET QErr IO) EncJSON -> Maybe PreparedSql -> m (DiffTime, EncJSON) Source #
runPGSubscription :: MonadIO m => SourceConfig ('Postgres pgKind) -> MultiplexedQuery ('Postgres pgKind) -> [(CohortId, CohortVariables)] -> m (DiffTime, Either QErr [(CohortId, ByteString)]) Source #
runPGStreamingSubscription :: MonadIO m => SourceConfig ('Postgres pgKind) -> MultiplexedQuery ('Postgres pgKind) -> [(CohortId, CohortVariables)] -> m (DiffTime, Either QErr [(CohortId, ByteString, CursorVariableValues)]) Source #
runPGQueryExplain :: forall pgKind m. (MonadIO m, MonadError QErr m) => DBStepInfo ('Postgres pgKind) -> m EncJSON Source #
mkQueryLog :: GQLReqUnparsed -> RootFieldAlias -> Maybe PreparedSql -> RequestId -> QueryLog Source #
runPGMutationTransaction :: (MonadIO m, MonadError QErr m, MonadQueryLog m, MonadTrace m) => RequestId -> GQLReqUnparsed -> UserInfo -> Logger Hasura -> SourceConfig ('Postgres pgKind) -> RootFieldMap (DBStepInfo ('Postgres pgKind)) -> m (DiffTime, RootFieldMap EncJSON) Source #