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

Hasura.Backends.Postgres.Instances.Execute

Description

Postgres Instances Execute

This module implements the needed functionality for implementing a BackendExecute instance for Postgres, which defines an interface for translating a root field into an execution plan and interacting with a database.

This module includes the Postgres implementation of queries, mutations, and more.

Synopsis

Documentation

data PreparedSql Source #

Constructors

PreparedSql 

Instances

Instances details
Show PreparedSql Source # 
Instance details

Defined in Hasura.Backends.Postgres.Instances.Execute

Orphan instances

(Backend ('Postgres pgKind), PostgresAnnotatedFieldJSON pgKind) => BackendExecute ('Postgres pgKind) Source # 
Instance details

Associated Types

type PreparedQuery ('Postgres pgKind) Source #

type MultiplexedQuery ('Postgres pgKind) Source #

type ExecutionMonad ('Postgres pgKind) :: (Type -> Type) -> Type -> Type Source #

Methods

mkDBQueryPlan :: (MonadError QErr m, MonadQueryTags m, MonadReader QueryTagsComment m) => UserInfo -> SourceName -> SourceConfig ('Postgres pgKind) -> QueryDB ('Postgres pgKind) Void (UnpreparedValue ('Postgres pgKind)) -> [Header] -> Maybe Name -> m (DBStepInfo ('Postgres pgKind)) Source #

mkDBMutationPlan :: (MonadError QErr m, MonadIO m, MonadQueryTags m, MonadReader QueryTagsComment m, MonadTrace m) => Environment -> Manager -> Logger Hasura -> UserInfo -> StringifyNumbers -> SourceName -> SourceConfig ('Postgres pgKind) -> MutationDB ('Postgres pgKind) Void (UnpreparedValue ('Postgres pgKind)) -> [Header] -> Maybe Name -> Maybe (HashMap Name (Value Variable)) -> m (DBStepInfo ('Postgres pgKind)) Source #

mkLiveQuerySubscriptionPlan :: (MonadError QErr m, MonadIO m, MonadBaseControl IO m, MonadReader QueryTagsComment m) => UserInfo -> SourceName -> SourceConfig ('Postgres pgKind) -> Maybe Name -> RootFieldMap (QueryDB ('Postgres pgKind) Void (UnpreparedValue ('Postgres pgKind))) -> [Header] -> Maybe Name -> m (SubscriptionQueryPlan ('Postgres pgKind) (MultiplexedQuery ('Postgres pgKind))) Source #

mkDBStreamingSubscriptionPlan :: (MonadError QErr m, MonadIO m, MonadBaseControl IO m, MonadReader QueryTagsComment m) => UserInfo -> SourceName -> SourceConfig ('Postgres pgKind) -> (RootFieldAlias, QueryDB ('Postgres pgKind) Void (UnpreparedValue ('Postgres pgKind))) -> [Header] -> Maybe Name -> m (SubscriptionQueryPlan ('Postgres pgKind) (MultiplexedQuery ('Postgres pgKind))) Source #

mkDBQueryExplain :: MonadError QErr m => RootFieldAlias -> UserInfo -> SourceName -> SourceConfig ('Postgres pgKind) -> QueryDB ('Postgres pgKind) Void (UnpreparedValue ('Postgres pgKind)) -> [Header] -> Maybe Name -> m (AnyBackend DBStepInfo) Source #

mkSubscriptionExplain :: (MonadError QErr m, MonadIO m, MonadBaseControl IO m) => SubscriptionQueryPlan ('Postgres pgKind) (MultiplexedQuery ('Postgres pgKind)) -> m SubscriptionQueryPlanExplanation Source #

mkDBRemoteRelationshipPlan :: (MonadError QErr m, MonadQueryTags m) => UserInfo -> SourceName -> SourceConfig ('Postgres pgKind) -> NonEmpty Object -> HashMap FieldName (Column ('Postgres pgKind), ScalarType ('Postgres pgKind)) -> FieldName -> (FieldName, SourceRelationshipSelection ('Postgres pgKind) Void UnpreparedValue) -> [Header] -> Maybe Name -> StringifyNumbers -> m (DBStepInfo ('Postgres pgKind)) Source #