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

Hasura.Backends.MSSQL.Instances.Execute

Description

MSSQL Instances Execute

Defines a BackendExecute type class instance for MSSQL.

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

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

Synopsis

Multiplexed query

Query

multiplexRootReselect :: [(CohortId, CohortVariables)] -> Reselect -> Select Source #

Producing the correct SQL-level list comprehension to multiplex a query Problem description:

Generate a query that repeats the same query N times but with certain slots replaced:

Select x y | (x,y) <- [..
]

Caution: Be aware that this query has a FOR JSON clause at the top-level and hence its results may be split up across multiple rows. Use forJsonQueryE to handle this.

Mutation

Subscription

Remote Relationships (e.g. DB-to-DB Joins, remote schema joins, etc.)

Orphan instances

BackendExecute 'MSSQL Source # 
Instance details

Methods

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

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

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

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

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

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

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