graphql-engine/server/src-lib/Hasura/RQL/IR/Update.hs
Vamshi Surabhi 23e1cb218a simplification of generalized joins execution
This PR simplifies the types that represent a remote relationship in IR so that they can be reused in other parts (in remote schema types) which could have remote relationships.

The comments on the PR explain the main changes.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2979
GitOrigin-RevId: 559c51d9d6ae79e2183ce4347018741b9096ac74
2021-12-07 13:12:57 +00:00

30 lines
903 B
Haskell

module Hasura.RQL.IR.Update
( AnnotatedUpdate,
AnnotatedUpdateG (..),
)
where
import Data.Kind (Type)
import Hasura.Prelude
import Hasura.RQL.IR.BoolExp
import Hasura.RQL.IR.Returning
import Hasura.RQL.Types.Backend
import Hasura.RQL.Types.Column
import Hasura.SQL.Backend
data AnnotatedUpdateG (b :: BackendType) (r :: Type) v = AnnotatedUpdateG
{ _auTable :: !(TableName b),
_auWhere :: !(AnnBoolExp b v, AnnBoolExp b v),
_auCheck :: !(AnnBoolExp b v),
-- | All the backend-specific data related to an update mutation
_auBackend :: BackendUpdate b v,
-- we don't prepare the arguments for returning
-- however the session variable can still be
-- converted as desired
_auOutput :: !(MutationOutputG b r v),
_auAllCols :: ![ColumnInfo b]
}
deriving (Functor, Foldable, Traversable)
type AnnotatedUpdate b = AnnotatedUpdateG b Void (SQLExpression b)